Skip to content

Commit 3453487

Browse files
committed
precommit and removed unnecessary comments
1 parent 95e331c commit 3453487

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

pandas/core/indexes/base.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3675,12 +3675,12 @@ def get_indexer(
36753675
target = self._maybe_cast_listlike_indexer(target)
36763676

36773677
from pandas.api.types import is_timedelta64_dtype
3678-
if (
3679-
self.dtype == "string[pyarrow]" and is_timedelta64_dtype(target.dtype)
3680-
) or (
3678+
3679+
if (self.dtype == "string[pyarrow]" and is_timedelta64_dtype(target.dtype)) or (
36813680
target.dtype == "string[pyarrow]" and is_timedelta64_dtype(self.dtype)
36823681
):
36833682
from pandas.core.arrays.timedeltas import sequence_to_td64ns
3683+
36843684
data, freq = sequence_to_td64ns(target, copy=False, unit=None)
36853685
target = type(target)(data)
36863686

@@ -6283,16 +6283,6 @@ def _find_common_type_compat(self, target) -> DtypeObj:
62836283
):
62846284
return _dtype_obj
62856285

6286-
# from pandas.api.types import is_timedelta64_dtype
6287-
# from pandas.core.arrays.timedeltas import sequence_to_td64ns
6288-
6289-
# if (
6290-
# self.dtype == "string[pyarrow]" and is_timedelta64_dtype(target_dtype)
6291-
# ) or (
6292-
# target_dtype == "string[pyarrow]" and is_timedelta64_dtype(self.dtype)
6293-
# ):
6294-
# return np.dtype("m8[ns]")
6295-
62966286
dtype = find_result_type(self.dtype, target)
62976287
dtype = common_dtype_categorical_compat([self, target], dtype)
62986288
return dtype

0 commit comments

Comments
 (0)