Skip to content

Commit 1fac0f4

Browse files
committed
mypy fixup
1 parent 264f64b commit 1fac0f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/core/dtypes/cast.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ def _disallow_mismatched_datetimelike(value, dtype: DtypeObj) -> None:
245245
raise TypeError(f"Cannot cast {value!r} to {dtype}")
246246

247247

248+
@overload
249+
def maybe_downcast_to_dtype(result: np.ndarray, dtype: np.dtype) -> np.ndarray: ...
250+
251+
252+
@overload
253+
def maybe_downcast_to_dtype(
254+
result: ExtensionArray, dtype: np.dtype
255+
) -> ExtensionArray: ...
256+
257+
248258
def maybe_downcast_to_dtype(result: ArrayLike, dtype: np.dtype) -> ArrayLike:
249259
"""
250260
try to cast to the specified dtype (e.g. convert back to bool/int

0 commit comments

Comments
 (0)