Skip to content

Commit a965b35

Browse files
committed
⬆️ add dprint as dev dependency
1 parent 0667281 commit a965b35

File tree

2 files changed

+140
-130
lines changed

2 files changed

+140
-130
lines changed

pyproject.toml

Lines changed: 124 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -2,74 +2,72 @@
22
requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

5-
65
[project]
76
name = "scipy-stubs"
87
version = "1.16.0.1.dev0"
98
description = "Type annotations for SciPy"
109
readme = "README.md"
1110
authors = [
12-
{name = "Joren Hammudoglu", email = "[email protected]"},
11+
{ name = "Joren Hammudoglu", email = "[email protected]" },
1312
]
1413
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]" },
1716
]
1817
license = "BSD-3-Clause"
1918
keywords = ["scipy", "typing", "stubs", "mypy", "pyright", "pep484", "pep561", "scipy-stubs"]
2019
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",
3231
]
3332
requires-python = ">=3.11"
3433
dependencies = ["optype>=0.10.0,<1"]
3534

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"]
4437

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"
4543

4644
[dependency-groups]
4745
extras = ["scipy-stubs[scipy]"]
4846
ci = ["packaging>=25.0"]
4947
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",
5352
]
5453
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
6059
]
6160
dev = [
62-
{include-group = "lint"},
63-
{include-group = "type"},
61+
{ include-group = "lint" },
62+
{ include-group = "type" },
6463
]
6564

6665
[tool.hatch.build]
6766
packages = ["scipy-stubs"]
6867

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
7371

7472
[tool.poe.tasks.clean]
7573
cmd = """
@@ -96,8 +94,7 @@ uv run
9694
--mypy-config-file=pyproject.toml
9795
$modules
9896
"""
99-
args = [{name = "modules", positional = true, multiple = true, default = "scipy"}]
100-
97+
args = [{ name = "modules", positional = true, multiple = true, default = "scipy" }]
10198

10299
[tool.typos.files]
103100
extend-exclude = ["*.pyi", ".mypyignore"]
@@ -119,7 +116,6 @@ disallow_subclassing_any = false
119116
# optype.numpy compat
120117
always_true = ["NP125", "NP126", "NP20", "NP21", "NP22", "NP23"]
121118

122-
123119
[tool.pyright]
124120
include = ["scipy-stubs", "scripts", "tests"]
125121
ignore = [".venv"]
@@ -171,27 +167,26 @@ reportPrivateUsage = true
171167
reportUnreachable = true
172168
reportUnsafeMultipleInheritance = true # base
173169

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
182178

183179
[tool.repo-review]
184180
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
192188
]
193189

194-
195190
[tool.ruff]
196191
src = ["scipy-stubs", "scripts"]
197192
extend-exclude = [".git", ".mypy_cache", ".tox", ".venv"]
@@ -200,83 +195,82 @@ force-exclude = true
200195
line-length = 130
201196
preview = true
202197

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
234228

235229
[tool.tox]
236230
min_version = "4"
237231
requires = ["tox-uv>=1"]
238232
env_list = ["lint", "pyright", "mypy", "3.11", "3.12", "3.13", "3.14"]
239233

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+
]

uv.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)