2
2
requires = [" hatchling" ]
3
3
build-backend = " hatchling.build"
4
4
5
-
6
5
[project ]
7
6
name = " scipy-stubs"
8
7
version = " 1.16.0.1.dev0"
9
8
description = " Type annotations for SciPy"
10
9
readme = " README.md"
11
10
authors = [
12
- { name =
" Joren Hammudoglu" ,
email =
" [email protected] " },
11
+ { name =
" Joren Hammudoglu" ,
email =
" [email protected] " },
13
12
]
14
13
maintainers = [
15
- { name =
" Joren Hammudoglu" ,
email =
" [email protected] " },
16
- { name =
" SciPy Developers" ,
email =
" [email protected] " },
14
+ { name =
" Joren Hammudoglu" ,
email =
" [email protected] " },
15
+ { name =
" SciPy Developers" ,
email =
" [email protected] " },
17
16
]
18
17
license = " BSD-3-Clause"
19
18
keywords = [" scipy" , " typing" , " stubs" , " mypy" , " pyright" , " pep484" , " pep561" , " scipy-stubs" ]
20
19
classifiers = [
21
- " Development Status :: 5 - Production/Stable" ,
22
- " Intended Audience :: Developers" ,
23
- " Intended Audience :: Science/Research" ,
24
- " Operating System :: OS Independent" ,
25
- " Programming Language :: Python" ,
26
- " Programming Language :: Python :: 3" ,
27
- " Programming Language :: Python :: 3.11" ,
28
- " Programming Language :: Python :: 3.12" ,
29
- " Programming Language :: Python :: 3.13" ,
30
- " Programming Language :: Python :: 3.14" ,
31
- " Typing :: Stubs Only" ,
20
+ " Development Status :: 5 - Production/Stable" ,
21
+ " Intended Audience :: Developers" ,
22
+ " Intended Audience :: Science/Research" ,
23
+ " Operating System :: OS Independent" ,
24
+ " Programming Language :: Python" ,
25
+ " Programming Language :: Python :: 3" ,
26
+ " Programming Language :: Python :: 3.11" ,
27
+ " Programming Language :: Python :: 3.12" ,
28
+ " Programming Language :: Python :: 3.13" ,
29
+ " Programming Language :: Python :: 3.14" ,
30
+ " Typing :: Stubs Only" ,
32
31
]
33
32
requires-python = " >=3.11"
34
33
dependencies = [" optype>=0.10.0,<1" ]
35
34
36
- [project .optional-dependencies ]
37
- scipy = [" scipy>=1.16.0,<1.17" ]
38
-
39
- [project .urls ]
40
- Homepage = " https://scipy.org/"
41
- Repository = " https://github.com/scipy/scipy-stubs/"
42
- Issues = " https://github.com/scipy/scipy-stubs/issues"
43
- Changelog = " https://github.com/scipy/scipy-stubs/releases"
35
+ [project .optional-dependencies ]
36
+ scipy = [" scipy>=1.16.0,<1.17" ]
44
37
38
+ [project .urls ]
39
+ Homepage = " https://scipy.org/"
40
+ Repository = " https://github.com/scipy/scipy-stubs/"
41
+ Issues = " https://github.com/scipy/scipy-stubs/issues"
42
+ Changelog = " https://github.com/scipy/scipy-stubs/releases"
45
43
46
44
[dependency-groups ]
47
45
extras = [" scipy-stubs[scipy]" ]
48
46
ci = [" packaging>=25.0" ]
49
47
lint = [
50
- {include-group = " extras" },
51
- " ruff>=0.12.1" ,
52
- " sp-repo-review[cli]>=2025.5.2" ,
48
+ { include-group = " extras" },
49
+ " dprint-py>=0.50.0.0" ,
50
+ " ruff>=0.12.1" ,
51
+ " sp-repo-review[cli]>=2025.5.2" ,
53
52
]
54
53
type = [
55
- { include-group = " extras" },
56
- { include-group = " ci" },
57
- " basedpyright>=1.29.4" ,
58
- " mypy>=1.16.1" ,
59
- " orjson>=3.10.18; python_version<'3.14'" , # used by mypy
54
+ { include-group = " extras" },
55
+ { include-group = " ci" },
56
+ " basedpyright>=1.29.4" ,
57
+ " mypy>=1.16.1" ,
58
+ " orjson>=3.10.18; python_version<'3.14'" , # used by mypy
60
59
]
61
60
dev = [
62
- { include-group = " lint" },
63
- { include-group = " type" },
61
+ { include-group = " lint" },
62
+ { include-group = " type" },
64
63
]
65
64
66
65
[tool .hatch .build ]
67
66
packages = [" scipy-stubs" ]
68
67
69
- [tool .hatch .build .targets .sdist ]
70
- exclude = [" CODE_OF_CONDUCT.md" , " README.md" , " SECURITY.md" , " uv.lock" ]
71
- force-include = {".mypyignore" = " .mypyignore" } # for scipy-stubs-feedstock
72
-
68
+ [tool .hatch .build .targets .sdist ]
69
+ exclude = [" CODE_OF_CONDUCT.md" , " README.md" , " SECURITY.md" , " uv.lock" ]
70
+ force-include = { ".mypyignore" = " .mypyignore" } # for scipy-stubs-feedstock
73
71
74
72
[tool .poe .tasks .clean ]
75
73
cmd = """
96
94
--mypy-config-file=pyproject.toml
97
95
$modules
98
96
"""
99
- args = [{name = " modules" , positional = true , multiple = true , default = " scipy" }]
100
-
97
+ args = [{ name = " modules" , positional = true , multiple = true , default = " scipy" }]
101
98
102
99
[tool .typos .files ]
103
100
extend-exclude = [" *.pyi" , " .mypyignore" ]
@@ -119,7 +116,6 @@ disallow_subclassing_any = false
119
116
# optype.numpy compat
120
117
always_true = [" NP125" , " NP126" , " NP20" , " NP21" , " NP22" , " NP23" ]
121
118
122
-
123
119
[tool .pyright ]
124
120
include = [" scipy-stubs" , " scripts" , " tests" ]
125
121
ignore = [" .venv" ]
@@ -171,27 +167,26 @@ reportPrivateUsage = true
171
167
reportUnreachable = true
172
168
reportUnsafeMultipleInheritance = true # base
173
169
174
- [tool .pyright .defineConstant ]
175
- # optype.numpy compat
176
- NP125 = true
177
- NP126 = true
178
- NP20 = true
179
- NP21 = true
180
- NP22 = true
181
- NP23 = true
170
+ [tool .pyright .defineConstant ]
171
+ # optype.numpy compat
172
+ NP125 = true
173
+ NP126 = true
174
+ NP20 = true
175
+ NP21 = true
176
+ NP22 = true
177
+ NP23 = true
182
178
183
179
[tool .repo-review ]
184
180
ignore = [
185
- " PY004" , # no /docs
186
- " PY006" , # pre-commit should not be used
187
- " PY007" , # tox configured in tox.toml
188
- " PP301" , # pytest is irrelevant
189
- " PC111" , # no blacken-docs because markdown has no code
190
- " PC170" , # no pygrep-hooks because no rST
191
- " RTD" , # no RTD
181
+ " PY004" , # no /docs
182
+ " PY006" , # pre-commit should not be used
183
+ " PY007" , # tox configured in tox.toml
184
+ " PP301" , # pytest is irrelevant
185
+ " PC111" , # no blacken-docs because markdown has no code
186
+ " PC170" , # no pygrep-hooks because no rST
187
+ " RTD" , # no RTD
192
188
]
193
189
194
-
195
190
[tool .ruff ]
196
191
src = [" scipy-stubs" , " scripts" ]
197
192
extend-exclude = [" .git" , " .mypy_cache" , " .tox" , " .venv" ]
@@ -200,83 +195,82 @@ force-exclude = true
200
195
line-length = 130
201
196
preview = true
202
197
203
- [tool .ruff .format ]
204
- line-ending = " lf"
205
- skip-magic-trailing-comma = true
206
-
207
- [tool .ruff .lint ]
208
- select = [" ALL" ]
209
- ignore = [" D" , " FBT" , " ANN401" , " COM812" , " CPY" , " EM" , " TD" , " FIX" , " DOC" ]
210
-
211
- [tool .ruff .lint .per-file-ignores ]
212
- "*.pyi" = [" F" , " E741" , " N" , " A" , " PYI054" , " PLC2701" , " PLW3201" , " PLR" , " FURB" ]
213
-
214
- [tool .ruff .lint .flake8-import-conventions ]
215
- banned-from = [" numpy" , " numpy.typing" , " optype" , " optype.numpy" , " optype.typing" ]
216
-
217
- [tool .ruff .lint .flake8-import-conventions .extend-aliases ]
218
- "ctypes" = " ct"
219
- "datetime" = " dt"
220
- "numpy" = " np"
221
- "numpy.typing" = " npt"
222
- "optype" = " op"
223
- "optype.numpy" = " onp"
224
- "optype.numpy.compat" = " npc"
225
- "optype.typing" = " opt"
226
-
227
- [tool .ruff .lint .isort ]
228
- case-sensitive = true
229
- combine-as-imports = true
230
- extra-standard-library = [" _typeshed" , " typing_extensions" ]
231
- known-local-folder = [" scipy" ]
232
- split-on-trailing-comma = false
233
-
198
+ [tool .ruff .format ]
199
+ line-ending = " lf"
200
+ skip-magic-trailing-comma = true
201
+
202
+ [tool .ruff .lint ]
203
+ select = [" ALL" ]
204
+ ignore = [" D" , " FBT" , " ANN401" , " COM812" , " CPY" , " EM" , " TD" , " FIX" , " DOC" ]
205
+
206
+ [tool .ruff .lint .per-file-ignores ]
207
+ "*.pyi" = [" F" , " E741" , " N" , " A" , " PYI054" , " PLC2701" , " PLW3201" , " PLR" , " FURB" ]
208
+
209
+ [tool .ruff .lint .flake8-import-conventions ]
210
+ banned-from = [" numpy" , " numpy.typing" , " optype" , " optype.numpy" , " optype.typing" ]
211
+
212
+ [tool .ruff .lint .flake8-import-conventions .extend-aliases ]
213
+ "ctypes" = " ct"
214
+ "datetime" = " dt"
215
+ "numpy" = " np"
216
+ "numpy.typing" = " npt"
217
+ "optype" = " op"
218
+ "optype.numpy" = " onp"
219
+ "optype.numpy.compat" = " npc"
220
+ "optype.typing" = " opt"
221
+
222
+ [tool .ruff .lint .isort ]
223
+ case-sensitive = true
224
+ combine-as-imports = true
225
+ extra-standard-library = [" _typeshed" , " typing_extensions" ]
226
+ known-local-folder = [" scipy" ]
227
+ split-on-trailing-comma = false
234
228
235
229
[tool .tox ]
236
230
min_version = " 4"
237
231
requires = [" tox-uv>=1" ]
238
232
env_list = [" lint" , " pyright" , " mypy" , " 3.11" , " 3.12" , " 3.13" , " 3.14" ]
239
233
240
- [tool .tox .env_run_base ]
241
- description = " stubtest with {base_python}"
242
- runner = " uv-venv-lock-runner"
243
- dependency_groups = [" type" ]
244
- uv_sync_flags = [" --no-editable" , " --reinstall-package=scipy-stubs" ]
245
- commands = [
246
- [
247
- " stubtest" ,
248
- " --allowlist=.mypyignore" ,
249
- " --mypy-config-file=pyproject.toml" ,
250
- { replace = " posargs" , default = [" scipy" ], extend = true },
251
- ],
252
- ]
253
-
254
- [tool .tox .env .lint ]
255
- description = " lint"
256
- runner = " uv-venv-lock-runner"
257
- dependency_groups = [" lint" ]
258
- commands = [
259
- [" repo-review" , " ." ],
260
- [" ruff" , " check" , " --show-fixes" ],
261
- [" ruff" , " format" , " --check" ],
262
- ]
263
-
264
- [tool .tox .env .pyright ]
265
- description = " basedpyright"
266
- runner = " uv-venv-lock-runner"
267
- dependency_groups = [" type" ]
268
- commands = [[" basedpyright" ]]
269
-
270
- [tool .tox .env .mypy ]
271
- description = " mypy"
272
- runner = " uv-venv-lock-runner"
273
- dependency_groups = [" type" ]
274
- commands = [
275
- [
276
- " mypy" ,
277
- " --hide-error-context" ,
278
- " --hide-error-code-links" ,
279
- " --no-incremental" ,
280
- { replace = " posargs" , default = [" ." ], extend = true },
281
- ],
282
- ]
234
+ [tool .tox .env_run_base ]
235
+ description = " stubtest with {base_python}"
236
+ runner = " uv-venv-lock-runner"
237
+ dependency_groups = [" type" ]
238
+ uv_sync_flags = [" --no-editable" , " --reinstall-package=scipy-stubs" ]
239
+ commands = [
240
+ [
241
+ " stubtest" ,
242
+ " --allowlist=.mypyignore" ,
243
+ " --mypy-config-file=pyproject.toml" ,
244
+ { replace = " posargs" , default = [" scipy" ], extend = true },
245
+ ],
246
+ ]
247
+
248
+ [tool .tox .env .lint ]
249
+ description = " lint"
250
+ runner = " uv-venv-lock-runner"
251
+ dependency_groups = [" lint" ]
252
+ commands = [
253
+ [" repo-review" , " ." ],
254
+ [" ruff" , " check" , " --show-fixes" ],
255
+ [" ruff" , " format" , " --check" ],
256
+ ]
257
+
258
+ [tool .tox .env .pyright ]
259
+ description = " basedpyright"
260
+ runner = " uv-venv-lock-runner"
261
+ dependency_groups = [" type" ]
262
+ commands = [[" basedpyright" ]]
263
+
264
+ [tool .tox .env .mypy ]
265
+ description = " mypy"
266
+ runner = " uv-venv-lock-runner"
267
+ dependency_groups = [" type" ]
268
+ commands = [
269
+ [
270
+ " mypy" ,
271
+ " --hide-error-context" ,
272
+ " --hide-error-code-links" ,
273
+ " --no-incremental" ,
274
+ { replace = " posargs" , default = [" ." ], extend = true },
275
+ ],
276
+ ]
0 commit comments