Skip to content

Upgrade ruff version and rules #629

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

Merged
merged 9 commits into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
rev: v0.12.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ ignore = [
"UP019",
"UP035",
"UP038",
"UP045", # X | None instead of Optional[X]
# Not relevant here
"RUF012",
"RUF022",
"RUF023",
"RUF012", # Use ClassVar for mutables
"RUF022", # Unsorted __all__
"RUF023", # Unsorted __slots__
"B903", # Use dataclass / namedtuple
"RUF031", # parentheses for tuples in subscripts
# Ruff doesn't understand the globals() assignment; we test __all__
# directly in test_all_names_in___all__.
"F822",
Expand All @@ -109,6 +112,9 @@ ignore = [
"E306",
"E501",
"E701",
# Harmful for tests if applied.
"RUF036", # None not at end of Union
"RUF041", # nested Literal
]

[tool.ruff.lint.isort]
Expand Down
Loading