Skip to content

Commit 8ca0393

Browse files
committed
pre-commit
1 parent 564d041 commit 8ca0393

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

pandas/core/arrays/datetimes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@
4545
tzconversion,
4646
)
4747
from pandas._libs.tslibs.dtypes import abbrev_to_npy_unit
48-
from pandas.errors import PerformanceWarning, TimezoneDtypeMismatchError
48+
from pandas.errors import (
49+
PerformanceWarning,
50+
TimezoneDtypeMismatchError,
51+
)
4952
from pandas.util._exceptions import find_stack_level
5053
from pandas.util._validators import validate_inclusive
5154

pandas/core/dtypes/cast.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,13 +1098,13 @@ def maybe_cast_to_datetime(
10981098
dta = DatetimeArray._from_sequence(value, dtype=dtype)
10991099
except TimezoneDtypeMismatchError as err:
11001100
raise ValueError(
1101-
"Cannot convert timezone-aware data to "
1102-
"timezone-naive dtype. Use "
1103-
"pd.Series(values).dt.tz_localize(None) instead."
1104-
) from err
1101+
"Cannot convert timezone-aware data to "
1102+
"timezone-naive dtype. Use "
1103+
"pd.Series(values).dt.tz_localize(None) instead."
1104+
) from err
11051105
except ValueError:
1106-
raise
1107-
1106+
raise
1107+
11081108
return dta
11091109

11101110

0 commit comments

Comments
 (0)