-
Notifications
You must be signed in to change notification settings - Fork 58
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
Use black for code formatting #191
Conversation
Coincidentally I also checked black recently. It's a decent idea. Sometimes its default formatting is not very good (for instance I stumbled upon psf/black#824), but the advantage of never needing to bother with minutia could outweigh this drawback. |
Is it possible to separate black and other linters from the rest of the pipeline? |
We can create a separate |
So that it is clearer for people submitting the code what goes wrong. Also so that we may ignore it or apply it on our own. Also if we're using black, we need to document it and make a pre-commit hook. |
We could use https://github.com/pre-commit/pre-commit for that. |
But if the tests fail one can just click on the details and see what failed exactly, which is what one needs to do if something fails anyway. |
Well, for example right now the authors check failed but we don't see that. |
pre-commit seems OK (if only a bit of an overkill for a pure python package with one hook so far), but my point is mainly that we should document how to use black in e.g. |
A relevant issue in black psf/black#148. |
03f5a3b
to
1e2ac8f
Compare
@akhmerov I've added I've fixed all |
rev: 3.7.4 | ||
hooks: | ||
- id: flake8 | ||
args: ['--max-line-length=500', '--ignore=E203,E266,E501,W503', '--max-complexity=18', '--select=B,C,E,F,W,T4,B9'] |
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.
These settings are like this to make black compatible with flake8
4b23f8b
to
2bfa78d
Compare
f7d3afa
to
62232b0
Compare
LGTM |
I am merging into stable to avoid many merge conflicts in the future. |
No description provided.