Skip to content

Commit 505ce94

Browse files
committed
🚨 fftpack.helper: fix python-version-dependent stubtest error
1 parent 5c04b92 commit 505ce94

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

‎.mypyignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ scipy\.((_|\w)+\.)+(__test__|test|tests(\..+)?)
99
scipy\._lib\.(array_api_compat|array_api_extra|cobyqa).*
1010
scipy\.fft\._pocketfft\..*
1111

12-
# numpy re-export with wrong annotations on numpy<1.24
13-
scipy\.fftpack\.(_?helper\.)?fftfreq
14-
1512
# namespace pollution
1613
scipy\._lib\.decorator\.(DEF|ArgSpec|FunctionMaker|__init__|append|dispatch_on|get_init|getargspec|init|n_args)
1714
scipy\.stats\._rcont\.rcont

‎scipy-stubs/fftpack/helper.pyi

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
# This module is not meant for public use and will be removed in SciPy v2.0.0.
2-
import sys
32
from typing import Final
43
from typing_extensions import deprecated
54

65
__all__ = ["fftfreq", "fftshift", "ifftshift", "next_fast_len", "rfftfreq"]
76

87
__MESSAGE: Final = "will be removed in SciPy v2.0.0"
98

10-
if sys.version_info >= (3, 13):
11-
# `device` was added in numpy 2
12-
@deprecated(__MESSAGE)
13-
def fftfreq(n: object, d: object = ..., device: object = ...) -> object: ...
14-
else:
15-
@deprecated(__MESSAGE)
16-
def fftfreq(n: object, d: object = ...) -> object: ...
17-
9+
@deprecated(__MESSAGE)
10+
def fftfreq(n: object, d: object = ..., device: object = ...) -> object: ...
1811
@deprecated(__MESSAGE)
1912
def fftshift(x: object, axes: object = ...) -> object: ...
2013
@deprecated(__MESSAGE)

0 commit comments

Comments
 (0)