@@ -70,9 +70,7 @@ array-api-extra = { path = ".", editable = true }
7070
7171[tool .pixi .feature .lint .dependencies ]
7272pre-commit = " *"
73- pylint = " *"
74- basedmypy = " *"
75- basedpyright = " *"
73+ mypy = " *"
7674typing_extensions = " >=4.12.2,<4.13"
7775# import dependencies for mypy:
7876array-api-strict = " *"
@@ -81,11 +79,9 @@ pytest = "*"
8179
8280[tool .pixi .feature .lint .tasks ]
8381pre-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" }
8583mypy = { 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" ] }
8985
9086[tool .pixi .feature .tests .dependencies ]
9187pytest = " >=6"
@@ -154,42 +150,34 @@ run.source = ["array_api_extra"]
154150report.exclude_also = [
155151 ' \.\.\.' ,
156152 ' if typing.TYPE_CHECKING:' ,
153+ ' if TYPE_CHECKING:' ,
157154]
158155
159156
160157# mypy
161158
162159[tool .mypy ]
163- files = [" src" , " tests" ]
160+ files = [" src" , " tests" , " vendor_tests " ]
164161python_version = " 3.10"
165- warn_unused_configs = true
166162strict = 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
171163# data-apis/array-api#589
172164disallow_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+
173176
174177[[tool .mypy .overrides ]]
175178module = " array_api_extra.*"
176- disallow_untyped_defs = true
177179disallow_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
193181
194182
195183# Ruff
@@ -200,11 +188,16 @@ target-version = "py310"
200188[tool .ruff .lint ]
201189extend-select = [
202190 " B" , # flake8-bugbear
191+ " F" , # Pyflakes
203192 " I" , # isort
193+ " E" , # Pycodestyle
194+ " W" , # Pycodestyle
195+ " N" , # pep8-naming
204196 " ARG" , # flake8-unused-arguments
205197 " C4" , # flake8-comprehensions
206198 " EM" , # flake8-errmsg
207199 " ICN" , # flake8-import-conventions
200+ " ISC" , # flake8-implicit-str-concat
208201 " G" , # flake8-logging-format
209202 " PGH" , # pygrep-hooks
210203 " PIE" , # flake8-pie
@@ -220,29 +213,15 @@ extend-select = [
220213 " EXE" , # flake8-executable
221214 " NPY" , # NumPy specific rules
222215 " PD" , # pandas-vet
216+ " UP" , # Pyupgrade
223217]
224218ignore = [
225219 " PLR09" , # Too many <...>
226220 " PLR2004" , # Magic value used in comparison
227221 " ISC001" , # Conflicts with formatter
222+ " N802" , # Function name should be lowercase
223+ " N806" , # Variable in function should be lowercase
228224]
229225
230226[tool .ruff .lint .per-file-ignores ]
231227"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