New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce black via pre-commit
tool
#53
Conversation
Looks cool, I'll test tomorrow and review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @dwinston !
One comment regarding python version, otherwise good.
By the way did you pre-commit run --all-files
?
Depending on how strict we want to be, you can also add something like pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
on travis
@ltalirz I also just added a commit with the changes suggested by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, agree that there's no reason not to move to Python 3.7 since we're using typing so heavily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @dwinston !
For #33.
On
git commit
andgit push
,pre-commit
runsblack
over relevant changed files. The first timepre-commit
is run, it installsblack
in a separate, sandboxed Python environment that it uses on subsequent runs.Add
pre-commit install
line to README, which installs hooks (from./pre-commit-config.yaml
) into.git/hooks/pre-commit
so that e.g.black
runs automatically ongit commit
.