Skip to content

Commit

Permalink
fix mypy error with # type: ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
arw2019 committed Oct 10, 2020
1 parent b5cd73c commit 20c2620
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
is_timedelta64_dtype,
is_timedelta64_ns_dtype,
is_unsigned_integer_dtype,
needs_i8_conversion,
pandas_dtype,
)
from pandas.core.dtypes.dtypes import (
Expand Down Expand Up @@ -496,10 +495,8 @@ def maybe_casted_values(index, codes=None):
if mask.any():
values, _ = maybe_upcast_putmask(values, mask, np.nan)

from pandas.core.arrays import ExtensionArray

if needs_i8_conversion(values.dtype) and isinstance(values, ExtensionArray):
values = values_type(values, dtype=values_dtype)
if issubclass(values_type, DatetimeLikeArrayMixin):
values = values_type(values, dtype=values_dtype) # type: ignore

return values

Expand Down

0 comments on commit 20c2620

Please sign in to comment.