Skip to content

Commit 2db9006

Browse files
committed
Disable more autopep8 fixes handled by Ruff
1 parent 3629100 commit 2db9006

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

Diff for: pyproject.toml

+33-22
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,15 @@ ignore = [
130130
"E70", # Allow ... on same line as def
131131
# Autofixed by Ruff
132132
# Check for the "Fix" flag https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
133-
"E20", # whitespace-after-* & whitespace-before-*
134-
"E211", # whitespace-before-parameters
135-
"E231", # missing-whitespace
136-
"E401", # I001: unsorted-imports
137-
"E71", # Comparisons
133+
"E2", # Whitespace
134+
"E703", # useless-semicolon
135+
"E71", # Statement (comparisons)
138136
"E731", # lambda-assignment
139-
"W29", # Whitespaces
137+
"W29", # Whitespace warning
140138
"W605", # invalid-escape-sequence
139+
# Autofixed by other Ruff rules
140+
"E401", # I001: unsorted-imports
141+
"W690", # UP: pyupgrade
141142
]
142143

143144
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#sample-pyprojecttoml-file
@@ -146,14 +147,37 @@ typeCheckingMode = "strict"
146147
pythonVersion = "3.10"
147148
# Prefer `pyright: ignore`
148149
enableTypeIgnoreComments = false
149-
# Extra strict
150+
151+
###
152+
# Downgraded diagnostics
153+
###
154+
# Type stubs may not be completable
155+
reportMissingTypeStubs = "warning"
156+
# Extra runtime safety
157+
reportUnnecessaryComparison = "warning"
158+
# Using Flake8/Ruff instead. Name is already grayed out and red squiggle looks like a mistyped import
159+
reportUnusedImport = "none"
160+
# pywin32 has way too many Unknown parameters left
161+
reportUnknownMemberType = "none"
162+
163+
###
164+
# Off by default even in strict mode
165+
###
166+
deprecateTypingAliases = true
167+
enableExperimentalFeatures = true
168+
reportCallInDefaultInitializer = "error"
150169
reportImplicitOverride = "error"
151170
reportImplicitStringConcatenation = "error"
152-
reportCallInDefaultInitializer = "error"
153-
reportMissingSuperCall = "none" # False positives on base classes
171+
# False positives with TYPE_CHECKING
172+
reportImportCycles = "information"
173+
# Too strict. False positives on base classes
174+
reportMissingSuperCall = "none"
154175
reportPropertyTypeMismatch = "error"
176+
reportShadowedImports = "error"
155177
reportUninitializedInstanceVariable = "error"
156178
reportUnnecessaryTypeIgnoreComment = "error"
179+
reportUnusedCallResult = "none"
180+
157181
# Exclude from scanning when running pyright
158182
exclude = [
159183
".venv/",
@@ -166,16 +190,3 @@ ignore = [
166190
# We expect stub files to be incomplete or contain useless statements
167191
"**/*.pyi",
168192
]
169-
reportUnusedCallResult = "none"
170-
# Type stubs may not be completable
171-
reportMissingTypeStubs = "warning"
172-
# False positives with TYPE_CHECKING
173-
reportImportCycles = "information"
174-
# False positives with PySide .connect
175-
reportFunctionMemberAccess = "none"
176-
# Extra runtime safety
177-
reportUnnecessaryComparison = "warning"
178-
# Using Flake8/Ruff instead
179-
reportUnusedImport = "none"
180-
# pywin32 has way too many Unknown parameters left
181-
reportUnknownMemberType = "none"

0 commit comments

Comments
 (0)