Skip to content

Commit 4d74dc8

Browse files
committed
signal: Move gausspulse overloads around to satisfy mypy
This doesn't fix `stubtest` however but it does fix `typetest`.
1 parent 3278292 commit 4d74dc8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

scipy-stubs/signal/_waveforms.pyi

+12-12
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ def unit_impulse(
7373
dtype: _DTypeLike[_SCT],
7474
) -> npt.NDArray[_SCT]: ...
7575

76+
# Overloads for gausspulse when `t` is `"cutoff"`
77+
@overload # retquad: False = ..., retenv: False = ...
78+
def gausspulse(
79+
t: Literal["cutoff"],
80+
fc: onp.ToFloat = 1000,
81+
bw: onp.ToFloat = 0.5,
82+
bwr: onp.ToFloat = -6,
83+
tpr: onp.ToFloat = -60,
84+
retquad: op.CanBool = False,
85+
retenv: op.CanBool = False,
86+
) -> np.float64: ...
87+
7688
# Overloads for gausspulse when `t` is scalar
7789
@overload # retquad: False = ..., retenv: False = ...
7890
def gausspulse(
@@ -222,15 +234,3 @@ def gausspulse(
222234
retquad: _Truthy,
223235
retenv: _Truthy,
224236
) -> tuple[_Array_f8, _Array_f8, _Array_f8]: ...
225-
226-
# Overloads for gausspulse when `t` is `"cutoff"`
227-
@overload # retquad: False = ..., retenv: False = ...
228-
def gausspulse(
229-
t: Literal["cutoff"],
230-
fc: onp.ToFloat = 1000,
231-
bw: onp.ToFloat = 0.5,
232-
bwr: onp.ToFloat = -6,
233-
tpr: onp.ToFloat = -60,
234-
retquad: op.CanBool = False,
235-
retenv: op.CanBool = False,
236-
) -> np.float64: ...

0 commit comments

Comments
 (0)