@@ -73,15 +73,14 @@ pre-commit = "*"
73
73
pylint = " *"
74
74
basedmypy = " *"
75
75
basedpyright = " *"
76
- typing_extensions = " >=4.12.2,<4.13"
77
76
# import dependencies for mypy:
78
77
array-api-strict = " *"
79
78
numpy = " *"
80
79
pytest = " *"
81
80
82
81
[tool .pixi .feature .lint .tasks ]
83
82
pre-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" }
85
84
mypy = { cmd = " mypy" , cwd = " ." }
86
85
pylint = { cmd = [" pylint" , " array_api_extra" ], cwd = " src" }
87
86
pyright = { cmd = " basedpyright" , cwd = " ." }
@@ -94,21 +93,22 @@ array-api-strict = "*"
94
93
numpy = " *"
95
94
96
95
[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" }
99
98
tests-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" ] }
100
101
101
102
[tool .pixi .feature .docs .dependencies ]
102
103
sphinx = " >=7.0"
103
104
furo = " >=2023.08.17"
104
105
myst-parser = " >=0.13"
105
106
sphinx-copybutton = " *"
106
107
sphinx-autodoc-typehints = " *"
107
- typing_extensions = " >=4.12.2,<4.13"
108
108
109
109
[tool .pixi .feature .docs .tasks ]
110
110
docs = { 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 " ] }
112
112
113
113
[tool .pixi .feature .dev .dependencies ]
114
114
ipython = " *"
@@ -154,6 +154,7 @@ run.source = ["array_api_extra"]
154
154
report.exclude_also = [
155
155
' \.\.\.' ,
156
156
' if typing.TYPE_CHECKING:' ,
157
+ ' if TYPE_CHECKING:' ,
157
158
]
158
159
159
160
@@ -200,11 +201,16 @@ target-version = "py310"
200
201
[tool .ruff .lint ]
201
202
extend-select = [
202
203
" B" , # flake8-bugbear
204
+ " F" , # Pyflakes
203
205
" I" , # isort
206
+ " E" , # Pycodestyle
207
+ " W" , # Pycodestyle
208
+ " N" , # pep8-naming
204
209
" ARG" , # flake8-unused-arguments
205
210
" C4" , # flake8-comprehensions
206
211
" EM" , # flake8-errmsg
207
212
" ICN" , # flake8-import-conventions
213
+ " ISC" , # flake8-implicit-str-concat
208
214
" G" , # flake8-logging-format
209
215
" PGH" , # pygrep-hooks
210
216
" PIE" , # flake8-pie
@@ -220,11 +226,14 @@ extend-select = [
220
226
" EXE" , # flake8-executable
221
227
" NPY" , # NumPy specific rules
222
228
" PD" , # pandas-vet
229
+ " UP" , # Pyupgrade
223
230
]
224
231
ignore = [
225
232
" PLR09" , # Too many <...>
226
233
" PLR2004" , # Magic value used in comparison
227
234
" ISC001" , # Conflicts with formatter
235
+ " N802" , # Function name should be lowercase
236
+ " N806" , # Variable in function should be lowercase
228
237
]
229
238
230
239
[tool .ruff .lint .per-file-ignores ]
0 commit comments