Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: mypy --no-incremental --cache-dir=/dev/null scipy-stubs

- name: stubtest scipy
run: stubtest --allowlist=.mypyignore scipy
run: stubtest --ignore-disjoint-bases --allowlist=.mypyignore scipy

typetest:
# needs: generate-matrix
Expand Down
33 changes: 19 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ extras = ["scipy-stubs[scipy]"]
ci = ["packaging>=25.0"]
lint = [
{ include-group = "extras" },
"dprint-py>=0.50.1.4",
"ruff>=0.13.0",
"sp-repo-review[cli]>=2025.5.2",
"dprint-py==0.50.1.4",
"ruff==0.13.0",
"sp-repo-review[cli]==2025.5.2",
]
type = [
{ include-group = "extras" },
{ include-group = "ci" },
"array-api-compat==1.12.0", # bundled as `scipy._lib.array_api_compat`
"basedpyright>=1.31.4",
"mypy[faster-cache]>=1.17.1,<1.18",
"basedpyright==1.31.4",
"mypy[faster-cache]==1.18.1",
]
dev = [
{ include-group = "lint" },
Expand All @@ -71,20 +71,24 @@ dev = [
[tool.poe.tasks.clean]
cmd = """
rm -rf
**/*.pyc
**/__pycache__
**/.cache
**/.mypy_cache
**/.ruff_cache
**/.tox
**/*.pyc
**/__pycache__
**/.cache
**/.mypy_cache
**/.ruff_cache
**/.tox
"""

[tool.poe.tasks.stubtest]
cmd = """
uv run --no-editable --reinstall-package=scipy-stubs
stubtest --allowlist=.mypyignore $modules
uv run
--no-editable
--reinstall-package=scipy-stubs
stubtest
--ignore-disjoint-bases
--allowlist=.mypyignore
scipy
"""
args = [{ name = "modules", positional = true, multiple = true, default = "scipy" }]

[tool.typos.files]
extend-exclude = ["*.pyi", ".mypyignore"]
Expand Down Expand Up @@ -207,6 +211,7 @@ uv_sync_flags = ["--no-editable", "--reinstall-package=scipy-stubs"]
commands = [
[
"stubtest",
"--ignore-disjoint-bases",
"--allowlist=.mypyignore",
{ replace = "posargs", default = ["scipy"], extend = true },
],
Expand Down
3 changes: 1 addition & 2 deletions scipy-stubs/stats/_biasedurn.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# see `scipy/stats/_biasedurn.pyx`

from typing import Never, type_check_only
from typing import type_check_only

import numpy as np
import optype as op
Expand All @@ -21,7 +21,6 @@ class _PyFishersNCHypergeometric(_PyNCHypergeometric): ...
class _PyWalleniusNCHypergeometric(_PyNCHypergeometric): ...

class _PyStochasticLib3:
def __init__(self, /, *args: Never, **kwargs: Never) -> None: ...
def Random(self, /) -> float: ...
def SetAccuracy(self, /, accur: op.CanFloat) -> None: ...
def FishersNCHyp(self, /, n: op.CanInt, m: op.CanInt, N: op.CanInt, odds: op.CanFloat) -> _PyFishersNCHypergeometric: ...
Expand Down
Loading