Skip to content

Commit 7c18175

Browse files
authored
⬆️ bump mypy to 1.18.1 and --ignore-disjoint-bases (#877)
2 parents 021882c + 06e3f6b commit 7c18175

File tree

4 files changed

+58
-54
lines changed

4 files changed

+58
-54
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
run: mypy --no-incremental --cache-dir=/dev/null scipy-stubs
8585

8686
- name: stubtest scipy
87-
run: stubtest --allowlist=.mypyignore scipy
87+
run: stubtest --ignore-disjoint-bases --allowlist=.mypyignore scipy
8888

8989
typetest:
9090
# needs: generate-matrix

pyproject.toml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ extras = ["scipy-stubs[scipy]"]
5252
ci = ["packaging>=25.0"]
5353
lint = [
5454
{ include-group = "extras" },
55-
"dprint-py>=0.50.1.4",
56-
"ruff>=0.13.0",
57-
"sp-repo-review[cli]>=2025.5.2",
55+
"dprint-py==0.50.1.4",
56+
"ruff==0.13.0",
57+
"sp-repo-review[cli]==2025.5.2",
5858
]
5959
type = [
6060
{ include-group = "extras" },
6161
{ include-group = "ci" },
6262
"array-api-compat==1.12.0", # bundled as `scipy._lib.array_api_compat`
63-
"basedpyright>=1.31.4",
64-
"mypy[faster-cache]>=1.17.1,<1.18",
63+
"basedpyright==1.31.4",
64+
"mypy[faster-cache]==1.18.1",
6565
]
6666
dev = [
6767
{ include-group = "lint" },
@@ -71,20 +71,24 @@ dev = [
7171
[tool.poe.tasks.clean]
7272
cmd = """
7373
rm -rf
74-
**/*.pyc
75-
**/__pycache__
76-
**/.cache
77-
**/.mypy_cache
78-
**/.ruff_cache
79-
**/.tox
74+
**/*.pyc
75+
**/__pycache__
76+
**/.cache
77+
**/.mypy_cache
78+
**/.ruff_cache
79+
**/.tox
8080
"""
8181

8282
[tool.poe.tasks.stubtest]
8383
cmd = """
84-
uv run --no-editable --reinstall-package=scipy-stubs
85-
stubtest --allowlist=.mypyignore $modules
84+
uv run
85+
--no-editable
86+
--reinstall-package=scipy-stubs
87+
stubtest
88+
--ignore-disjoint-bases
89+
--allowlist=.mypyignore
90+
scipy
8691
"""
87-
args = [{ name = "modules", positional = true, multiple = true, default = "scipy" }]
8892

8993
[tool.typos.files]
9094
extend-exclude = ["*.pyi", ".mypyignore"]
@@ -207,6 +211,7 @@ uv_sync_flags = ["--no-editable", "--reinstall-package=scipy-stubs"]
207211
commands = [
208212
[
209213
"stubtest",
214+
"--ignore-disjoint-bases",
210215
"--allowlist=.mypyignore",
211216
{ replace = "posargs", default = ["scipy"], extend = true },
212217
],

scipy-stubs/stats/_biasedurn.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# see `scipy/stats/_biasedurn.pyx`
22

3-
from typing import Never, type_check_only
3+
from typing import type_check_only
44

55
import numpy as np
66
import optype as op
@@ -21,7 +21,6 @@ class _PyFishersNCHypergeometric(_PyNCHypergeometric): ...
2121
class _PyWalleniusNCHypergeometric(_PyNCHypergeometric): ...
2222

2323
class _PyStochasticLib3:
24-
def __init__(self, /, *args: Never, **kwargs: Never) -> None: ...
2524
def Random(self, /) -> float: ...
2625
def SetAccuracy(self, /, accur: op.CanFloat) -> None: ...
2726
def FishersNCHyp(self, /, n: op.CanInt, m: op.CanInt, N: op.CanInt, odds: op.CanFloat) -> _PyFishersNCHypergeometric: ...

0 commit comments

Comments
 (0)