rehandalal / therapist

Work out your commitment issues.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

therapist run skip black

VietThan opened this issue Β· comments

Hello πŸ‘‹ , this is similar to #51 and I tried staging the files but getting skips

Environment
Using python3.9, homebrew install, Mac Pro M1, zsh

Steps to reproduce:

$ mkdir therapist-test
$ cd therapist-test
$ export VENV=$(pwd)/env
$ python3 -m venv $VENV
$ git init
$ touch test.py
$ echo "def hello(): print('hello world')" >> test.py
$ echo "hello()" >> test.py
$ $VENV/bin/pip3 install therapist
$ $VENV/bin/pip3 install black
$ #create yaml .therapist.yml with black
$ $VENV/bin/therapist install 
Installing pre-commit hook...	DONE
$ git add test.py
$ $VENV/bin/therapist run 
black ............................................................... [SKIPPED]
-------------------------------------------------------------------------------
Completed in: 0.0s

.therapist.yml content:

actions:
     black:
         run: black -l 79 {files}
         include: β€œ*.py”

Expected output:
Not skips

commented

@VietThan thanks for the issue report. i'm going to try to wire up a unit test to reproduce your issue.

one thing i notice above (and i just want to rule it out) is that you are not using standard quotes in the provided .yml file. You aren't using " you're using β€œ and ” which will not get parsed correctly.

@rehandalal , wow, thank you, that is exactly it! I remember now, I copied the yaml configuration from my colleague on slack, it was probably not in a code block (and slack turns all " into β€œ and ”)

commented

Glad that worked out!