Skip to content

Commit 939e7dd

Browse files
dinasvWillAyd
authored andcommitted
CLN: F-strings (#30916)
1 parent 7f2948c commit 939e7dd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/arrays/timedeltas.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
from pandas.tseries.frequencies import to_offset
4444
from pandas.tseries.offsets import Tick
4545

46-
_BAD_DTYPE = "dtype {dtype} cannot be converted to timedelta64[ns]"
47-
4846

4947
def _is_convertible_to_td(key):
5048
return isinstance(key, (Tick, timedelta, np.timedelta64, str))
@@ -1064,7 +1062,7 @@ def _validate_td64_dtype(dtype):
10641062
raise ValueError(msg)
10651063

10661064
if not is_dtype_equal(dtype, _TD_DTYPE):
1067-
raise ValueError(_BAD_DTYPE.format(dtype=dtype))
1065+
raise ValueError(f"dtype {dtype} cannot be converted to timedelta64[ns]")
10681066

10691067
return dtype
10701068

0 commit comments

Comments
 (0)