Skip to content

Commit 6c9eeec

Browse files
committed
Feedback: Disable autofix, per-file-ignores
1 parent 6b72619 commit 6c9eeec

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ repos:
33
rev: v0.12.2
44
hooks:
55
- id: ruff
6-
args: [--fix, --exit-non-zero-on-fix]
76
- repo: https://github.com/pre-commit/pre-commit-hooks
87
rev: v4.5.0
98
hooks:

pyproject.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,11 @@ ignore = [
9191
"UP019",
9292
"UP035",
9393
"UP038",
94-
# Not relevant here, or harmful for tests if applied.
94+
"UP045", # X | None instead of Optional[X]
95+
# Not relevant here
9596
"RUF012", # Use ClassVar for mutables
9697
"RUF022", # Unsorted __all__
9798
"RUF023", # Unsorted __slots__
98-
"RUF031", # parentheses for tuples in subscripts
99-
"RUF036", # None not at end of Union
100-
"RUF041", # nested Literal
10199
"B903", # Use dataclass / namedtuple
102100
# Ruff doesn't understand the globals() assignment; we test __all__
103101
# directly in test_all_names_in___all__.
@@ -114,6 +112,12 @@ ignore = [
114112
"E501",
115113
"E701",
116114
]
115+
"src/test_typing_extensions.py" = [
116+
# Harmful for tests if applied.
117+
"RUF031", # parentheses for tuples in subscripts
118+
"RUF036", # None not at end of Union
119+
"RUF041", # nested Literal
120+
]
117121

118122
[tool.ruff.lint.isort]
119123
extra-standard-library = ["tomllib"]

0 commit comments

Comments
 (0)