-
Notifications
You must be signed in to change notification settings - Fork 244
misc: Ruff #2771
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
base: main
Are you sure you want to change the base?
misc: Ruff #2771
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2771 +/- ##
==========================================
+ Coverage 83.02% 83.19% +0.16%
==========================================
Files 248 248
Lines 50804 50589 -215
Branches 4479 4392 -87
==========================================
- Hits 42180 42087 -93
+ Misses 7857 7753 -104
+ Partials 767 749 -18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # But ignore these inconvenient rules | ||
| ignore = ["F403", "E226", "E731", "E275", "F405", "E722", "E741", "W605"] | ||
|
|
||
| [tool.isort] |
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.
you look back 10 years ago or so there's a commit with message "FREEEEEEEEEEEEEDOOOMM" in which we are essentially removing isort from devito 😂
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 was the motivation for removing?
| [tool.isort] | ||
| line_length = 90 | ||
| known_first_party = ["devito", "examples"] | ||
| multi_line_output = "VERTICAL_GRID_GROUPED" |
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.
if this is for
from X import (
A,
B,
C,
...
)
then I vote no
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.
No this is in direct response to your comment on my other PR. This is specifically to avoid using ruff for the import formatting (see this issue)
a6b218b to
17df046
Compare
17df046 to
ac4c9cf
Compare
ac4c9cf to
a4609a1
Compare
a4609a1 to
43a044d
Compare
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
I'm trying to automate detection a lot of the "nitpick" code review comments and providing a route to automatically fixing the issues apriori.
What I have added to CI is equivalent to locally running:
isort --check-only --sort-reexports --multi-line VERTICAL_GRID_GROUPED --line-length 90 --force-alphabetical-sort-within-sections --project devito,examples . ruff check --preview --select E,W,F,B,UP,SIM,I,RUF022 --ignore F403,E226,E731,E275,F405,E722,E741,W605 --line-length=90 --output-format conciseMost command line arguments are included in the
pyproject.tomland checking out this branch you can just runisort --check-only . ruff check --output-format conciseFixing most linting issues is as simple as
isort . ruff check --fixif you trust the auto-formatter!
This PR also extends linting to Dockerfiles and Github actions too.
An excerpt from
CONTRIBUTING.md: