Skip to content

Commit c615c2e

Browse files
committed
Upgrade ruff
1 parent 6e57223 commit c615c2e

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.9.6
3+
rev: v0.12.2
44
hooks:
55
- id: ruff
66
args: [--fix, --exit-non-zero-on-fix]

pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,14 @@ ignore = [
9191
"UP019",
9292
"UP035",
9393
"UP038",
94-
# Not relevant here
95-
"RUF012",
96-
"RUF022",
97-
"RUF023",
98-
"RUF041",
94+
# Not relevant here, or harmful for tests if applied.
95+
"RUF012", # Use ClassVar for mutables
96+
"RUF022", # Unsorted __all__
97+
"RUF023", # Unsorted __slots__
98+
"RUF031", # parentheses for tuples in subscripts
99+
"RUF041", # nested Literal
100+
"RUF036", # None not at end of Union
101+
"B903", # Use dataclass / namedtuple
99102
# Ruff doesn't understand the globals() assignment; we test __all__
100103
# directly in test_all_names_in___all__.
101104
"F822",

src/_typed_dict_test_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Foo(TypedDict):
1616

1717

1818
class FooGeneric(TypedDict, Generic[T]):
19-
a: Optional[T]
19+
a: Optional[T] # noqa: UP045 while < (3, 10)
2020

2121

2222
class VeryAnnotated(TypedDict, total=False):

0 commit comments

Comments
 (0)