Skip to content

Commit fef8350

Browse files
committed
CLN: run flynt to use f-strings (mechanical)
1 parent a793802 commit fef8350

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

pandas/core/arraylike.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,7 @@ def array_ufunc(self, ufunc: np.ufunc, method: str, *inputs: Any, **kwargs: Any)
304304
# well. Previously this raised an internal ValueError. We might
305305
# support it someday, so raise a NotImplementedError.
306306
raise NotImplementedError(
307-
"Cannot apply ufunc {} to mixed DataFrame and Series "
308-
"inputs.".format(ufunc)
307+
f"Cannot apply ufunc {ufunc} to mixed DataFrame and Series inputs."
309308
)
310309
axes = self.axes
311310
for obj in alignable[1:]:

pandas/tests/io/excel/test_openpyxl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_to_excel_with_openpyxl_engine(ext):
269269
df2 = DataFrame({"B": np.linspace(1, 20, 10)})
270270
df = pd.concat([df1, df2], axis=1)
271271
styled = df.style.applymap(
272-
lambda val: "color: %s" % ("red" if val < 0 else "black")
272+
lambda val: f"color: {'red' if val < 0 else 'black'}"
273273
).highlight_max()
274274

275275
styled.to_excel(filename, engine="openpyxl")

pandas/tests/io/test_fsspec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_from_s3_csv(s3_resource, tips_file, s3so):
211211
@td.skip_if_no("s3fs")
212212
def test_s3_protocols(s3_resource, tips_file, protocol, s3so):
213213
tm.assert_equal(
214-
read_csv("%s://pandas-test/tips.csv" % protocol, storage_options=s3so),
214+
read_csv(f"{protocol}://pandas-test/tips.csv", storage_options=s3so),
215215
read_csv(tips_file),
216216
)
217217

0 commit comments

Comments
 (0)