Skip to content

Commit 62c33b2

Browse files
authored
Merge pull request #84 from jorenham/mypy/scipy.signal
fix mypy errors in `scipy.signal`
2 parents 2e94f58 + 33c2783 commit 62c33b2

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
3333
- uses: actions/setup-python@v5
3434
with:
35-
python-version: "3.10"
35+
python-version: "3.13"
3636
cache: poetry
3737

3838
- name: install
@@ -44,7 +44,10 @@ jobs:
4444
- name: typetest
4545
run: poe typetest
4646

47-
- name: typecheck (partial)
47+
- name: basedmypy
48+
run: poe mypy
49+
50+
- name: basedpyright (partial)
4851
run: |
4952
targets=(
5053
"_lib"
@@ -62,7 +65,6 @@ jobs:
6265
"special"
6366
)
6467
for target in "${targets[@]}"; do
65-
poe mypy $target
6668
poe pyright $target
6769
done
6870

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ci:
77
- ruff-format
88
- verifytypes
99
- typetest
10+
- basedmypy
1011

1112
repos:
1213
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -62,3 +63,9 @@ repos:
6263
language: system
6364
always_run: true
6465
pass_filenames: false
66+
67+
- id: basedmypy
68+
name: basedmypy
69+
entry: poe mypy
70+
language: system
71+
types_or: [python, pyi]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pip install scipy-stubs
9090
| `ndimage` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :full_moon: |
9191
| `odr` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :waxing_crescent_moon: |
9292
| `optimize` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :first_quarter_moon: |
93-
| `signal` | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | :waxing_crescent_moon: |
93+
| `signal` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :waxing_crescent_moon: |
9494
| `sparse` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :waxing_crescent_moon: |
9595
| `spatial` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :waxing_gibbous_moon: |
9696
| `special` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :first_quarter_moon: |

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ cmd = "basedpyright scipy-stubs/$path"
6868
args = [{name = "path", positional = true, multiple = false, default = ""}]
6969

7070
[tool.poe.tasks.mypy]
71-
cmd = "mypy --config-file=pyproject.toml scipy-stubs/$path"
72-
args = [{name = "path", positional = true, multiple = false, default = ""}]
71+
cmd = "mypy --config-file=pyproject.toml $path"
72+
args = [{name = "path", positional = true, multiple = true, default = "scipy-stubs"}]
7373

7474
[tool.poe.tasks.stubtest]
7575
cmd = """

scipy-stubs/signal/_ltisys.pyi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ class lti(LinearTimeInvariant):
4646
class dlti(LinearTimeInvariant):
4747
def __new__(cls, *system, **kwargs) -> Self: ...
4848
def __init__(self, *system, **kwargs) -> None: ...
49-
@property
50-
def dt(self) -> Untyped: ...
51-
@dt.setter
52-
def dt(self, dt) -> None: ...
5349
def impulse(self, x0: Untyped | None = None, t: Untyped | None = None, n: Untyped | None = None) -> Untyped: ...
5450
def step(self, x0: Untyped | None = None, t: Untyped | None = None, n: Untyped | None = None) -> Untyped: ...
5551
def output(self, u, t, x0: Untyped | None = None) -> Untyped: ...
@@ -85,14 +81,6 @@ class ZerosPolesGain(LinearTimeInvariant):
8581
def __new__(cls, *system, **kwargs) -> Self: ...
8682
def __init__(self, *system, **kwargs) -> None: ...
8783
@property
88-
def zeros(self) -> Untyped: ...
89-
@zeros.setter
90-
def zeros(self, zeros) -> None: ...
91-
@property
92-
def poles(self) -> Untyped: ...
93-
@poles.setter
94-
def poles(self, poles) -> None: ...
95-
@property
9684
def gain(self) -> Untyped: ...
9785
@gain.setter
9886
def gain(self, gain) -> None: ...

0 commit comments

Comments
 (0)