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 1818import warnings
1919
2020import numpy as np
21- import pandas
2221
2322from pandas ._config import using_string_dtype
2423from pandas ._config .config import get_option
@@ -1490,9 +1489,11 @@ def __rsub__(self, other):
14901489
14911490 # We get here with e.g. datetime objects
14921491 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+ )
14961497 return - (datetime_result )
14971498
14981499 def __iadd__ (self , other ) -> Self :
You can’t perform that action at this time.
0 commit comments