Skip to content

Commit 25af8eb

Browse files
committed
revert non-central
1 parent 885dd68 commit 25af8eb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/core/indexes/datetimelike.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
is_string_dtype,
2828
is_timedelta64_dtype)
2929
from pandas.core.dtypes.generic import (
30-
ABCIndex, ABCSeries, ABCPeriodIndex, ABCIndexClass, ABCDateOffset)
30+
ABCIndex, ABCSeries, ABCPeriodIndex, ABCIndexClass)
3131
from pandas.core.dtypes.missing import isna
3232
from pandas.core import common as com, algorithms
3333
from pandas.core.algorithms import checked_add_with_arr
@@ -655,13 +655,14 @@ def _add_datetimelike_methods(cls):
655655
def __add__(self, other):
656656
from pandas.core.index import Index
657657
from pandas.core.indexes.timedeltas import TimedeltaIndex
658+
from pandas.tseries.offsets import DateOffset
658659

659660
other = lib.item_from_zerodim(other)
660661
if isinstance(other, ABCSeries):
661662
return NotImplemented
662663
elif is_timedelta64_dtype(other):
663664
return self._add_delta(other)
664-
elif isinstance(other, (ABCDateOffset, timedelta)):
665+
elif isinstance(other, (DateOffset, timedelta)):
665666
return self._add_delta(other)
666667
elif is_offsetlike(other):
667668
# Array/Index of DateOffset objects
@@ -696,13 +697,14 @@ def __sub__(self, other):
696697
from pandas.core.index import Index
697698
from pandas.core.indexes.datetimes import DatetimeIndex
698699
from pandas.core.indexes.timedeltas import TimedeltaIndex
700+
from pandas.tseries.offsets import DateOffset
699701

700702
other = lib.item_from_zerodim(other)
701703
if isinstance(other, ABCSeries):
702704
return NotImplemented
703705
elif is_timedelta64_dtype(other):
704706
return self._add_delta(-other)
705-
elif isinstance(other, (ABCDateOffset, timedelta)):
707+
elif isinstance(other, (DateOffset, timedelta)):
706708
return self._add_delta(-other)
707709
elif is_offsetlike(other):
708710
# Array/Index of DateOffset objects

0 commit comments

Comments
 (0)