-
Notifications
You must be signed in to change notification settings - Fork 37
Update Ruff to >=0.13 and simplify configs #185
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
Open
Avasam
wants to merge
1
commit into
jaraco:main
Choose a base branch
from
Avasam:update-ruff-and-simplify-configs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -11,35 +11,25 @@ extend-select = [ | |
| "FA", # flake8-future-annotations | ||
| "F404", # late-future-import | ||
| "PYI", # flake8-pyi | ||
| "UP006", # non-pep585-annotation | ||
| "UP007", # non-pep604-annotation | ||
| "UP010", # unnecessary-future-import | ||
| "UP035", # deprecated-import | ||
| "UP037", # quoted-annotation | ||
| "UP043", # unnecessary-default-type-args | ||
|
|
||
| # Code modernization (strings, annotations, conditions, ...) | ||
| "UP", # pyupgrade | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively: "C901", # complex-structure
"I", # isort
"PERF401", # manual-list-comprehension
"UP", # pyupgrade (Code modernization for strings, annotations, conditions, ...)
# Ensure modern type annotation syntax and best practices
# Not including those covered by type-checkers or exclusive to Python 3.11+
"FA", # flake8-future-annotations
"F404", # late-future-import
"PYI", # flake8-pyi |
||
|
|
||
| # local | ||
| ] | ||
| ignore = [ | ||
| # upstream | ||
| "UP015", # redundant-open-modes, explicit is preferred | ||
|
|
||
| # Typeshed rejects complex or non-literal defaults for maintenance and testing reasons, | ||
| # irrelevant to this project. | ||
| "PYI011", # typed-argument-default-in-stub | ||
| # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules | ||
| "W191", | ||
| "E111", | ||
| "E114", | ||
| "E117", | ||
| "D206", | ||
| "D300", | ||
| "Q000", | ||
| "Q001", | ||
| "Q002", | ||
| "Q003", | ||
| "COM812", | ||
| "COM819", | ||
|
|
||
| # local | ||
| ] | ||
|
|
||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Alternatively, this can be set directly in
ruff.tomlwith required-version. The UX is not great as it fails at runtime w/o telling you to bust your cache, also astral-sh/ruff#19922