Skip to content

Commit 81ffd4a

Browse files
committed
more type hints
1 parent d284baa commit 81ffd4a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/dtypes/cast.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@
7575
from pandas.core.dtypes.inference import is_list_like
7676
from pandas.core.dtypes.missing import is_valid_nat_for_dtype, isna, notna
7777

78-
from pandas.core.indexes.datetimes import DatetimeIndex
79-
8078
if TYPE_CHECKING:
8179
from pandas import Series
8280
from pandas.core.arrays import ExtensionArray
81+
from pandas.core.indexes.datetimes import DatetimeIndex
8382

8483
_int8_max = np.iinfo(np.int8).max
8584
_int16_max = np.iinfo(np.int16).max
@@ -1020,7 +1019,7 @@ def astype_nansafe(
10201019

10211020
def maybe_convert_objects(
10221021
values: np.ndarray, convert_numeric: bool = True
1023-
) -> Union[np.ndarray, DatetimeIndex]:
1022+
) -> Union[np.ndarray, "DatetimeIndex"]:
10241023
"""
10251024
If we have an object dtype array, try to coerce dates and/or numbers.
10261025

0 commit comments

Comments
 (0)