-
Notifications
You must be signed in to change notification settings - Fork 29
Add black formatter for Python code #91
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
Black is good. The only thing about it that I do not like is the 88 char wide lines. But, I can live with it. |
Line width is configurable via |
Using this instruction we can format whole code with black and make |
I think it is best to run this tool after #93 is merged, to avoid creating extensive conflicts. |
@oleksandr-pavlyk Thank you for your attention. |
This GitHub Action checks that code in pull request is formatted with black. See https://black.readthedocs.io/en/stable/github_actions.html
versioneer.py is not a part of the project. Add pyproject.toml file with section [tool.black] and parameter exclude = 'versioneer.py'. This file will be used by developers and GitHub Actions for black. Usign pyproject.toml allows use black like this: `black .`
Use black version 20.8b1 or branch [stable](https://github.com/psf/black/tree/stable)). Command: black .
File .git-blame-ignore-revs contains a list of revisions to use for ignoring in blame. Example: $ git blame FILE --ignore-revs-file .git-blame-ignore-revs Also you can configure git to automatically ignore revisions listed in a file on every call to git blame: $ git config blame.ignoreRevsFile .git-blame-ignore-revs Requirements: Git >=2.23
black is "The Uncompromising Code Formatter".
pyproject.toml
)black .
)Usage is simple:
black .
This PR should be merged, not squashed.
See black in pandas - https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#python-pep8-black