We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ruff
1 parent ffa950e commit 8c728f9Copy full SHA for 8c728f9
‎pyproject.toml‎
@@ -180,35 +180,26 @@ reportPrivateLocalImportUsage = true
180
reportUnannotatedClassAttribute = false
181
strictGenericNarrowing = true
182
183
+
184
[tool.ruff]
185
src = ["src", "tool"]
186
extend-exclude = [".git", ".mypy_cache", ".tox", ".venv"]
187
force-exclude = true
-# https://typing.python.org/en/latest/guides/writing_stubs.html#maximum-line-length
188
line-length = 120
189
preview = true
190
191
[tool.ruff.format]
192
- docstring-code-format = true
193
line-ending = "lf"
194
195
[tool.ruff.lint]
196
select = ["ALL"]
197
- ignore = [
198
- "FBT", # flake8-boolean-trap
199
- "CPY", # flake8-copyright
200
- "EM", # flake8-errmsg
201
- "FIX", # flake8-fixme
202
- "ANN401", # flake8-annotations: any-type
203
- "PYI041", # flake8-pyi: redundant-numeric-union
204
- ]
+ ignore = ["CPY", "FIX002"]
205
206
[tool.ruff.lint.per-file-ignores]
207
"*.pyi" = [
208
"N", # pep8-naming
209
"TD", # flake8-todo
210
"COM812", # flake8-commas: missing-trailing-comma
211
- "PYI054", # flake8-pyi: numeric-literal-too-long
212
"PLC2701", # pylint/C: import-private-name
213
]
214
‎src/_numtype/.ruff.toml‎
@@ -2,12 +2,4 @@ extend = "../../pyproject.toml"
2
3
4
[lint]
5
-extend-ignore = [
6
- "A", # flake8-builtins
7
- "PYI042", # flake8-pyi: snake-case-type-alias
8
- "PYI064", # flake8-pyi: redundant-final-literal
9
- "SLF001", # flake8-self: private-member-access
10
- "PLR2044", # pylint/R: empty-comment
11
- "PLR6301", # pylint/R: no-self-use
12
- "PLW3201", # pylint/W: bad-dunder-method-name
13
-]
+extend-ignore = ["PLR2044"] # pylint/R: empty-comment
‎src/numpy-stubs/.ruff.toml‎
@@ -4,18 +4,7 @@ line-length = 120
extend-ignore = [
"A", # flake8-builtins
- "S404", # flake8-bandit: suspicious-subprocess-import
- "PYI042", # flake8-pyi: snake-case-type-alias # TODO
- "PYI047", # flake8-pyi: unused-private-type-alias # TODO
- "E741", # pycodestyle/E: ambiguous-variable-name
- "E742", # pycodestyle/E: ambiguous-class-name
14
- "E743", # pycodestyle/E: ambiguous-function-name
15
16
17
- "PLR0904", # pylint/R: too-many-public-methods
18
- "PLR0913", # pylint/R: too-many-arguments
19
- "PLR0917", # pylint/R: too-many-positional-arguments
20
+ "ANN401", # flake8-annotations: any-type
+ "SLF001", # flake8-self: private-member-access
+ "PLR2044", # pylint/R: empty-comment
21
‎src/numpy-stubs/@test/.ruff.toml‎
@@ -4,8 +4,6 @@ line-length = 88
"D", # pydocstyle
- "ERA", # eradicate
- "S", # flake8-bandit
- "T", # flake8-print
- "PLR2004", # pylint: magic-value-comparisons
+ "FBT", # flake8-boolean-trap
+ "PYI054", # flake8-pyi: numeric-literal-too-long
‎src/numpy-stubs/@test/generated/.ruff.toml‎
@@ -3,12 +3,7 @@ line-length = 120
- "PTH", # flake8-use-pathlib
- "B015", # flake8-bugbear useless-comparison
"B018", # flake8-bugbear useless-expression
- "PYI015", # flake8-pyi: assignment-default-in-stub
- "PYI017", # flake8-pyi: complex-assignment-in-stub
"PLR0124", # pylint/R: comparison-with-itself
"PLC2801", # pylint/C: unnecessary-dunder-call
‎src/numpy-stubs/@test/runtime/.ruff.toml‎
@@ -6,13 +6,4 @@ extend-ignore = [
"ARG", # flake8-unused-arguments
"B015", # flake8-bugbear: useless-comparison
"B018", # flake8-bugbear: useless-expression
- "DTZ001", # flake8-datetimez: call-datetime-without-tzinfo
- "TD002", # flake8-todos: missing-todo-author
- "PLC2801", # pylint/C: unnecessary-dunder-call
- "PLR0124", # pylint/R: comparison-with-itself
- "F841", # pyflakes: unused-variable
- "UP018", # pyupgrade: native-literals
- "RUF046", # ruff: unnecessary-cast-to-int
‎src/numpy-stubs/@test/static/.ruff.toml‎
@@ -3,8 +3,8 @@ line-length = 120
+ "PYI015", # flake8-pyi: assignment-default-in-stub
+ "PYI017", # flake8-pyi: complex-assignment-in-stub
+ "PTH123", # flake8-use-pathlib: builtin-open
‎src/numpy-stubs/@test/static/accept/.ruff.toml‎
@@ -1,8 +1,4 @@
1
extend = "../.ruff.toml"
- "PT009", # flake8-pytest-style: pytest-unittest-assertion
+extend-ignore = ["PLR0124"] # pylint/R: comparison-with-itself
‎src/numpy-stubs/@test/static/reject/.ruff.toml‎
@@ -2,8 +2,4 @@ extend = "../.ruff.toml"
builtins = ["reveal_type"]
- "B", # flake8-bugbear
- "SIM300", # flake8-pyi: yoda-conditions
+extend-ignore = ["B015", "B018"] # flake8-bugbear: useless-{comparison,expression}
‎src/numtype/@test/.ruff.toml‎
@@ -3,6 +3,5 @@ extend = "../.ruff.toml"
+ "S101", # flake8-bandit: assert
0 commit comments