-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: update contributing guidelines for black #27233
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
Conversation
to automatically run ``black`` and ``flake8`` when you make a git commit. This | ||
can be done by installing ``pre-commit``:: | ||
|
||
pip install pre-commit |
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.
It seems that the conda-forge package is pre_commit (that's a bit an annoying name difference ..)
@@ -1,4 +1,5 @@ | |||
- [ ] closes #xxxx | |||
- [ ] tests added / passed | |||
- [ ] passes `black pandas` | |||
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff` |
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.
what should we be recommending here? Still keep both flake8 and black?
The problem with this version of the black command is also that it does the full code base and takes a while
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.
make black is pretty fast currently so i would just have this
hooks: | ||
- id: black | ||
language_version: python3.7 | ||
- repo: https://gitlab.com/pycqa/flake8 |
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.
@TomAugspurger do you know if there is a difference taking flake8 from its own repo or from the pre-commit-hooks repo?
In #23616 you use the pre-commit-hooks one, but in a recent gitter chat you pasted the above?
ok lgtm. |
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
thanks @jorisvandenbossche |
Closes #27226
Starting this by copying some content from dask (dask/dask#4983)
Also related to #23616 (recommending pre-commit hooks)