-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Black linting #639
Black linting #639
Conversation
tool-setup in pyproject.toml, and fixed Periodic table to not be formatted. Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #639 +/- ##
==========================================
+ Coverage 87.71% 87.73% +0.01%
==========================================
Files 362 362
Lines 48354 48436 +82
==========================================
+ Hits 42415 42496 +81
- Misses 5939 5940 +1
☔ View full report in Codecov by Sentry. |
Signed-off-by: Nick Papior <nickpapior@gmail.com>
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.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
Could you add this and |
Maybe using |
And actually if |
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Looks good to me! |
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
I have tried to make the test depend on the linter, this seems to not work since it is not part of the main branch. |
Signed-off-by: Nick Papior <nickpapior@gmail.com>
I'm just checking All you have to do is to have a # See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1
hooks:
- id: black-jupyter Then run It is much better than handling each fixer manually, give it a try :) Then the checkbox can simply be removed, and run |
I'll merge and continue :)
I think this is a great advice, if anything we could encourage users to do it, but since this package is still in its infancy int terms of adoption, I would be afraid that it scares people away. If people find this useful, then use it locally, it will help us, but it shouldn't be a barrier for new devs :) |
I think the separate fixers is more of a barrier than And the point is that in the end |
Ah, you want that, that could also be a way out. |
By the way having both approaches is possible. You just have the |
I have long wanted to do some kind of linting.
Playing round turns out that there is no tool that really suits every wish.
I think it would be beneficial for sisl to use a linter to reduce the pain of going through code styles which is somewhat subjective, and also turns out to be too time-consuming.
With this PR we enforce the black coding style, whether we like it or not.
Comments would be greatly appreciated.
isort .
at top--leveldocs/
CHANGELOG.md