Skip to content
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

Pre commit black #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Pre commit black #8

wants to merge 4 commits into from

Conversation

atolivero
Copy link
Contributor

Black is a great option for auto-formatting python code. To avoid needed to install and configure it for any contributors' setup, a pre-commit hook will be used to enforce the formatting in this repo.

pre-commit is added torequirements.txt, so when a developer builds and activates the environment, they will have the tool necessary to run this pre-commit hook.

If a file has not been formatted with black, the hook will fail and the file will be automatically formatted with black. The developer just needs to git add the file(s) that failed, then their commit should succeed.

pre-commit run --all-files was run for 47536ba, so all python files have been formatted.

atolivero and others added 4 commits September 15, 2020 20:06
Do this to ensure hooks are able to be run when the environment
is activated
Do this to enable black formatting to occur on commit
Do this so this can be enforced going forward
@atolivero atolivero requested a review from kwood16 September 16, 2020 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants