Skip to content

Commit 24643ee

Browse files
author
OlivierLuG
committed
Replace old string formatting syntax with f-strings pandas-dev#29547: 2 files were fixed
1 parent 014d8ea commit 24643ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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 = "Invalid ISO 8601 Duration format - {ts}"
588588

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

pandas/_libs/tslibs/timestamps.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def integer_op_not_supported(obj):
194194
"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)