@@ -73,15 +73,14 @@ pre-commit = "*"
7373pylint = " *"
7474basedmypy = " *"
7575basedpyright = " *"
76- typing_extensions = " >=4.12.2,<4.13"
7776# import dependencies for mypy:
7877array-api-strict = " *"
7978numpy = " *"
8079pytest = " *"
8180
8281[tool .pixi .feature .lint .tasks ]
8382pre-commit-install = { cmd = " pre-commit install" }
84- pre-commit = { cmd = " pre-commit run -v -- all-files --show-diff-on-failure " }
83+ pre-commit = { cmd = " pre-commit run -- all-files" }
8584mypy = { cmd = " mypy" , cwd = " ." }
8685pylint = { cmd = [" pylint" , " array_api_extra" ], cwd = " src" }
8786pyright = { cmd = " basedpyright" , cwd = " ." }
@@ -94,21 +93,22 @@ array-api-strict = "*"
9493numpy = " *"
9594
9695[tool .pixi .feature .tests .tasks ]
97- tests = { cmd = " pytest" }
98- tests-ci = { cmd = " pytest -ra --cov --cov-report=xml --cov-report=term --durations=20" }
96+ tests = { cmd = " pytest -v " }
97+ tests-ci = { cmd = " pytest -v - ra --cov --cov-report=xml --cov-report=term --durations=20" }
9998tests-vendor = { cmd = " pytest vendor_tests" }
99+ coverage = { cmd = [" coverage" , " html" ], depends-on = [" tests-ci" ] }
100+ open-coverage = { cmd = [" open" , " htmlcov/index.html" ], depends-on = [" coverage" ] }
100101
101102[tool .pixi .feature .docs .dependencies ]
102103sphinx = " >=7.0"
103104furo = " >=2023.08.17"
104105myst-parser = " >=0.13"
105106sphinx-copybutton = " *"
106107sphinx-autodoc-typehints = " *"
107- typing_extensions = " >=4.12.2,<4.13"
108108
109109[tool .pixi .feature .docs .tasks ]
110110docs = { cmd = [" sphinx-build" , " ." , " build/" ], cwd = " docs" }
111- open-docs = { cmd = [" open" , " build/index.html" ], cwd = " docs" }
111+ open-docs = { cmd = [" open" , " build/index.html" ], cwd = " docs" , depends-on = [ " docs " ] }
112112
113113[tool .pixi .feature .dev .dependencies ]
114114ipython = " *"
@@ -154,6 +154,7 @@ run.source = ["array_api_extra"]
154154report.exclude_also = [
155155 ' \.\.\.' ,
156156 ' if typing.TYPE_CHECKING:' ,
157+ ' if TYPE_CHECKING:' ,
157158]
158159
159160
@@ -200,11 +201,16 @@ target-version = "py310"
200201[tool .ruff .lint ]
201202extend-select = [
202203 " B" , # flake8-bugbear
204+ " F" , # Pyflakes
203205 " I" , # isort
206+ " E" , # Pycodestyle
207+ " W" , # Pycodestyle
208+ " N" , # pep8-naming
204209 " ARG" , # flake8-unused-arguments
205210 " C4" , # flake8-comprehensions
206211 " EM" , # flake8-errmsg
207212 " ICN" , # flake8-import-conventions
213+ " ISC" , # flake8-implicit-str-concat
208214 " G" , # flake8-logging-format
209215 " PGH" , # pygrep-hooks
210216 " PIE" , # flake8-pie
@@ -220,11 +226,14 @@ extend-select = [
220226 " EXE" , # flake8-executable
221227 " NPY" , # NumPy specific rules
222228 " PD" , # pandas-vet
229+ " UP" , # Pyupgrade
223230]
224231ignore = [
225232 " PLR09" , # Too many <...>
226233 " PLR2004" , # Magic value used in comparison
227234 " ISC001" , # Conflicts with formatter
235+ " N802" , # Function name should be lowercase
236+ " N806" , # Variable in function should be lowercase
228237]
229238
230239[tool .ruff .lint .per-file-ignores ]
0 commit comments