Skip to content

Commit 8b9ea47

Browse files
committed
Remove unnecessary f-strings
1 parent c61bea4 commit 8b9ea47

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

pandas/core/series.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,10 +2584,7 @@ def append(self, to_append, ignore_index=False, verify_integrity=False):
25842584
else:
25852585
to_concat = [self, to_append]
25862586
if any(isinstance(x, (ABCDataFrame,)) for x in to_concat[1:]):
2587-
msg = (
2588-
f"to_append should be a Series or list/tuple of Series, "
2589-
f"got DataFrame"
2590-
)
2587+
msg = "to_append should be a Series or list/tuple of Series, got DataFrame"
25912588
raise TypeError(msg)
25922589
return concat(
25932590
to_concat, ignore_index=ignore_index, verify_integrity=verify_integrity

pandas/tests/groupby/aggregate/test_numba.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def incorrect_function(x):
1818
{"key": ["a", "a", "b", "b", "a"], "data": [1.0, 2.0, 3.0, 4.0, 5.0]},
1919
columns=["key", "data"],
2020
)
21-
with pytest.raises(NumbaUtilError, match=f"The first 2"):
21+
with pytest.raises(NumbaUtilError, match="The first 2"):
2222
data.groupby("key").agg(incorrect_function, engine="numba")
2323

24-
with pytest.raises(NumbaUtilError, match=f"The first 2"):
24+
with pytest.raises(NumbaUtilError, match="The first 2"):
2525
data.groupby("key")["data"].agg(incorrect_function, engine="numba")
2626

2727

pandas/tests/groupby/transform/test_numba.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ def incorrect_function(x):
1717
{"key": ["a", "a", "b", "b", "a"], "data": [1.0, 2.0, 3.0, 4.0, 5.0]},
1818
columns=["key", "data"],
1919
)
20-
with pytest.raises(NumbaUtilError, match=f"The first 2"):
20+
with pytest.raises(NumbaUtilError, match="The first 2"):
2121
data.groupby("key").transform(incorrect_function, engine="numba")
2222

23-
with pytest.raises(NumbaUtilError, match=f"The first 2"):
23+
with pytest.raises(NumbaUtilError, match="The first 2"):
2424
data.groupby("key")["data"].transform(incorrect_function, engine="numba")
2525

2626

pandas/tests/io/test_stata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ def test_writer_118_exceptions(self):
18611861
@pytest.mark.parametrize("version", [105, 108, 111, 113, 114])
18621862
def test_backward_compat(version, datapath):
18631863
data_base = datapath("io", "data", "stata")
1864-
ref = os.path.join(data_base, f"stata-compat-118.dta")
1864+
ref = os.path.join(data_base, "stata-compat-118.dta")
18651865
old = os.path.join(data_base, f"stata-compat-{version}.dta")
18661866
expected = pd.read_stata(ref)
18671867
old_dta = pd.read_stata(old)

0 commit comments

Comments
 (0)