Skip to content

Commit 9f14a2a

Browse files
committed
remove pandas library and improve formatting
1 parent b9f41fb commit 9f14a2a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas/core/arrays/datetimelike.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import warnings
1919

2020
import numpy as np
21-
import pandas
2221

2322
from pandas._config import using_string_dtype
2423
from 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:

0 commit comments

Comments
 (0)