-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Lighter switch to ruff #2998
Merged
Merged
Lighter switch to ruff #2998
Changes from 10 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
4806473
Basic configuration from other branch.
jhale f55135e
Ignore X | Y, our supported Python to old
jhale 81e8a7f
Cannot use isort package from ruff.
jhale cebb334
Use traditional isort + ruff --fix .
jhale c3427f5
Unsafe fixes.
jhale b5b7191
Add back in isort.
jhale 0b67404
Add ruff.toml
jhale fb1f579
Fix.
jhale 54834fe
Ignore RUF012
jhale a32efe5
Fix circleci
jhale 231d144
Remove deprecated numpy random call.
jhale d80318d
Add back isort.
jhale 30a033d
Move Python minimum to 3.9 (discuss).
jhale 83996a2
Merge branch 'main' into jhale/ruff-light
jhale 3b33340
More fixes.
jhale a6287e5
Merge branch 'jhale/ruff-light' of github.com:FEniCS/dolfinx into jha…
jhale f6f4501
Merge remote-tracking branch 'origin/main' into jhale/ruff-light
jhale 081d670
ruff fix.
jhale f7f6896
Fix isort configuration and re-isort.
jhale 70be3d7
Fixes.
jhale 30e2f45
Python 3.10
jhale 0cb91ab
Merge remote-tracking branch 'origin/main' into jhale/ruff-light
jhale 57f0a62
Not necessary.
jhale 235515f
Add back in some removals.
jhale cce1384
Merge remote-tracking branch 'origin/main' into jhale/ruff-light
jhale 5d03160
isort.
jhale 383d406
Rocky and Intel OneAPI on Python 3.9
jhale 82eaf51
Seed random number generator.
jhale 41d8ace
Remove | stuff.
jhale 93b2da0
Fix circleci.
jhale 237e1f5
Merge remote-tracking branch 'origin/main' into jhale/ruff-light
jhale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extend = "../python/pyproject.toml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This change, and all similar ones, will break python
< 3.9
. I think thatruff
uses by default whatever version of python is available in the docker image (3.10
, if I remember correctly), but there is a configuration option to prevent it from doing that. However, I don't remember which of the rules is enforcing this change (pyupgrade
maybe?) to check the actual name of this option.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.
We should discuss deprecating 3.8, only has ~6 months of support left.
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.
I checked this. The target version is inferred from pyproject.toml.
ruff --show-settings | grep target_version
gives