Skip to content

Commit 75c0e24

Browse files
authored
CLN Replace old string formatting syntax with f-strings #29547: 2 files w… (#34370)
1 parent 3ae33c6 commit 75c0e24

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/_libs/tslibs/timedeltas.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ cdef inline int64_t parse_iso_format_string(str ts) except? -1:
584584
bint have_dot = 0, have_value = 0, neg = 0
585585
list number = [], unit = []
586586

587-
err_msg = "Invalid ISO 8601 Duration format - {}".format(ts)
587+
err_msg = f"Invalid ISO 8601 Duration format - {ts}"
588588

589589
for c in ts:
590590
# number (ascii codes)

pandas/_libs/tslibs/timestamps.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ def integer_op_not_supported(obj):
191191

192192
# GH#30886 using an fstring raises SystemError
193193
int_addsub_msg = (
194-
"Addition/subtraction of integers and integer-arrays with {cls} is "
194+
f"Addition/subtraction of integers and integer-arrays with {cls} is "
195195
"no longer supported. Instead of adding/subtracting `n`, "
196196
"use `n * obj.freq`"
197-
).format(cls=cls)
197+
)
198198
return TypeError(int_addsub_msg)
199199

200200

0 commit comments

Comments
 (0)