-
Notifications
You must be signed in to change notification settings - Fork 38
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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
-
- # Code modernization (strings, annotations, conditions, ...)
- "UP", # pyupgrade
Owner
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. I have a slight preference for this alternative, as it's more compact. |
||
|
|
||
| # 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", | ||
|
|
||
|
Owner
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. I'd like to keep this space for separation. |
||
| # local | ||
| ] | ||
|
|
||
|
|
||
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 if updating from before version0.14.11as it used to fails at runtime w/o telling you to re-sync your dependencies (astral-sh/ruff#19922)