Skip to content

Commit da05b12

Browse files
committed
TYP: fix newly surfaced typing issues in core.missing
1 parent 5715093 commit da05b12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/missing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
)
4646

4747
if TYPE_CHECKING:
48+
from collections.abc import Callable
4849
from typing import TypeAlias
4950

5051
from pandas import Index
@@ -548,7 +549,7 @@ def _interpolate_scipy_wrapper(
548549
new_x = np.asarray(new_x)
549550

550551
# ignores some kwargs that could be passed along.
551-
alt_methods = {
552+
alt_methods: dict[str, Callable[..., np.ndarray]] = {
552553
"barycentric": interpolate.barycentric_interpolate,
553554
"krogh": interpolate.krogh_interpolate,
554555
"from_derivatives": _from_derivatives,
@@ -566,6 +567,7 @@ def _interpolate_scipy_wrapper(
566567
"cubic",
567568
"polynomial",
568569
]
570+
terp: Callable[..., np.ndarray] | None
569571
if method in interp1d_methods:
570572
if method == "polynomial":
571573
kind = order

0 commit comments

Comments
 (0)