File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 18
18
import warnings
19
19
20
20
import numpy as np
21
- import pandas
22
21
23
22
from pandas ._config import using_string_dtype
24
23
from pandas ._config .config import get_option
@@ -1490,9 +1489,11 @@ def __rsub__(self, other):
1490
1489
1491
1490
# We get here with e.g. datetime objects
1492
1491
datetime_result = self - other
1493
- if isinstance (datetime_result , pandas .core .arrays .datetimes .DatetimeArray ):
1494
- raise TypeError ("TypeError: unsupported operand type(s) for -: "
1495
- f"'{ type (self ).__name__ } ' and '{ type (other ).__name__ } '" )
1492
+ if isinstance (datetime_result , DatetimeArray ):
1493
+ raise TypeError (
1494
+ "TypeError: unsupported operand type(s) for -: "
1495
+ f"'{ type (self ).__name__ } ' and '{ type (other ).__name__ } '"
1496
+ )
1496
1497
return - (datetime_result )
1497
1498
1498
1499
def __iadd__ (self , other ) -> Self :
You can’t perform that action at this time.
0 commit comments