Skip to content

Commit

Permalink
signal: Move gausspulse overloads around to satisfy mypy
Browse files Browse the repository at this point in the history
This doesn't fix `stubtest` however but it does fix `typetest`.
  • Loading branch information
pavyamsiri committed Nov 24, 2024
1 parent 4edcf25 commit 633310c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scipy-stubs/signal/_waveforms.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ def unit_impulse(
dtype: _DTypeLike[_SCT],
) -> npt.NDArray[_SCT]: ...

# Overloads for gausspulse when `t` is `"cutoff"`
@overload # retquad: False = ..., retenv: False = ...
def gausspulse(
t: Literal["cutoff"],
fc: onp.ToFloat = 1000,
bw: onp.ToFloat = 0.5,
bwr: onp.ToFloat = -6,
tpr: onp.ToFloat = -60,
retquad: op.CanBool = False,
retenv: op.CanBool = False,
) -> np.float64: ...

# Overloads for gausspulse when `t` is scalar
@overload # retquad: False = ..., retenv: False = ...
def gausspulse(
Expand Down Expand Up @@ -222,15 +234,3 @@ def gausspulse(
retquad: _Truthy,
retenv: _Truthy,
) -> tuple[_Array_f8, _Array_f8, _Array_f8]: ...

# Overloads for gausspulse when `t` is `"cutoff"`
@overload # retquad: False = ..., retenv: False = ...
def gausspulse(
t: Literal["cutoff"],
fc: onp.ToFloat = 1000,
bw: onp.ToFloat = 0.5,
bwr: onp.ToFloat = -6,
tpr: onp.ToFloat = -60,
retquad: op.CanBool = False,
retenv: op.CanBool = False,
) -> np.float64: ...

0 comments on commit 633310c

Please sign in to comment.