@@ -70,9 +70,7 @@ array-api-extra = { path = ".", editable = true }
70
70
71
71
[tool .pixi .feature .lint .dependencies ]
72
72
pre-commit = " *"
73
- pylint = " *"
74
- basedmypy = " *"
75
- basedpyright = " *"
73
+ mypy = " *"
76
74
typing_extensions = " >=4.12.2,<4.13"
77
75
# import dependencies for mypy:
78
76
array-api-strict = " *"
@@ -81,11 +79,9 @@ pytest = "*"
81
79
82
80
[tool .pixi .feature .lint .tasks ]
83
81
pre-commit-install = { cmd = " pre-commit install" }
84
- pre-commit = { cmd = " pre-commit run -v -- all-files --show-diff-on-failure " }
82
+ pre-commit = { cmd = " pre-commit run -- all-files" }
85
83
mypy = { cmd = " mypy" , cwd = " ." }
86
- pylint = { cmd = [" pylint" , " array_api_extra" ], cwd = " src" }
87
- pyright = { cmd = " basedpyright" , cwd = " ." }
88
- lint = { depends-on = [" pre-commit" , " pylint" , " mypy" , " pyright" ] }
84
+ lint = { depends-on = [" pre-commit" , " mypy" ] }
89
85
90
86
[tool .pixi .feature .tests .dependencies ]
91
87
pytest = " >=6"
@@ -154,42 +150,34 @@ run.source = ["array_api_extra"]
154
150
report.exclude_also = [
155
151
' \.\.\.' ,
156
152
' if typing.TYPE_CHECKING:' ,
153
+ ' if TYPE_CHECKING:' ,
157
154
]
158
155
159
156
160
157
# mypy
161
158
162
159
[tool .mypy ]
163
- files = [" src" , " tests" ]
160
+ files = [" src" , " tests" , " vendor_tests " ]
164
161
python_version = " 3.10"
165
- warn_unused_configs = true
166
162
strict = true
167
- enable_error_code = [" ignore-without-code" , " redundant-expr" , " truthy-bool" ]
168
- warn_unreachable = true
169
- disallow_untyped_defs = false
170
- disallow_incomplete_defs = false
171
163
# data-apis/array-api#589
172
164
disallow_any_expr = false
165
+ disallow_incomplete_defs = false
166
+ disallow_untyped_defs = false
167
+ disallow_untyped_decorators = true
168
+ ignore_missing_imports = true
169
+ no_implicit_optional = true
170
+ show_error_codes = true
171
+ warn_redundant_casts = true
172
+ warn_unused_configs = true
173
+ warn_unused_ignores = true
174
+ warn_unreachable = true
175
+
173
176
174
177
[[tool .mypy .overrides ]]
175
178
module = " array_api_extra.*"
176
- disallow_untyped_defs = true
177
179
disallow_incomplete_defs = true
178
-
179
-
180
- # pyright
181
-
182
- [tool .basedpyright ]
183
- include = [" src" , " tests" ]
184
- pythonVersion = " 3.10"
185
- pythonPlatform = " All"
186
- typeCheckingMode = " all"
187
-
188
- # data-apis/array-api#589
189
- reportAny = false
190
- reportExplicitAny = false
191
- # data-apis/array-api-strict#6
192
- reportUnknownMemberType = false
180
+ disallow_untyped_defs = true
193
181
194
182
195
183
# Ruff
@@ -200,11 +188,16 @@ target-version = "py310"
200
188
[tool .ruff .lint ]
201
189
extend-select = [
202
190
" B" , # flake8-bugbear
191
+ " F" , # Pyflakes
203
192
" I" , # isort
193
+ " E" , # Pycodestyle
194
+ " W" , # Pycodestyle
195
+ " N" , # pep8-naming
204
196
" ARG" , # flake8-unused-arguments
205
197
" C4" , # flake8-comprehensions
206
198
" EM" , # flake8-errmsg
207
199
" ICN" , # flake8-import-conventions
200
+ " ISC" , # flake8-implicit-str-concat
208
201
" G" , # flake8-logging-format
209
202
" PGH" , # pygrep-hooks
210
203
" PIE" , # flake8-pie
@@ -220,29 +213,15 @@ extend-select = [
220
213
" EXE" , # flake8-executable
221
214
" NPY" , # NumPy specific rules
222
215
" PD" , # pandas-vet
216
+ " UP" , # Pyupgrade
223
217
]
224
218
ignore = [
225
219
" PLR09" , # Too many <...>
226
220
" PLR2004" , # Magic value used in comparison
227
221
" ISC001" , # Conflicts with formatter
222
+ " N802" , # Function name should be lowercase
223
+ " N806" , # Variable in function should be lowercase
228
224
]
229
225
230
226
[tool .ruff .lint .per-file-ignores ]
231
227
"tests/**" = [" T20" ]
232
-
233
-
234
- # Pylint
235
-
236
- [tool .pylint ]
237
- py-version = " 3.10"
238
- ignore-paths = [" .*/_version.py" ]
239
- reports.output-format = " colorized"
240
- similarities.ignore-imports = " yes"
241
- messages_control.disable = [
242
- " design" ,
243
- " fixme" ,
244
- " line-too-long" ,
245
- " missing-module-docstring" ,
246
- " missing-function-docstring" ,
247
- " wrong-import-position" ,
248
- ]
0 commit comments