Skip to content

Commit 7f3d7b9

Browse files
ShaharNavehjreback
authored andcommitted
STY: Removed unconcatenated strings (#30464)
1 parent 3029d8f commit 7f3d7b9

29 files changed

+48
-86
lines changed

pandas/core/arrays/datetimelike.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -916,9 +916,7 @@ def _is_unique(self):
916916

917917
def _add_datetimelike_scalar(self, other):
918918
# Overriden by TimedeltaArray
919-
raise TypeError(
920-
f"cannot add {type(self).__name__} and " f"{type(other).__name__}"
921-
)
919+
raise TypeError(f"cannot add {type(self).__name__} and {type(other).__name__}")
922920

923921
_add_datetime_arraylike = _add_datetimelike_scalar
924922

pandas/core/dtypes/cast.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,7 @@ def astype_nansafe(arr, dtype, copy: bool = True, skipna: bool = False):
820820
if dtype.kind == "M":
821821
return arr.astype(dtype)
822822

823-
raise TypeError(
824-
f"cannot astype a datetimelike from [{arr.dtype}] " f"to [{dtype}]"
825-
)
823+
raise TypeError(f"cannot astype a datetimelike from [{arr.dtype}] to [{dtype}]")
826824

827825
elif is_timedelta64_dtype(arr):
828826
if is_object_dtype(dtype):
@@ -842,9 +840,7 @@ def astype_nansafe(arr, dtype, copy: bool = True, skipna: bool = False):
842840
elif dtype == _TD_DTYPE:
843841
return arr.astype(_TD_DTYPE, copy=copy)
844842

845-
raise TypeError(
846-
f"cannot astype a timedelta from [{arr.dtype}] " f"to [{dtype}]"
847-
)
843+
raise TypeError(f"cannot astype a timedelta from [{arr.dtype}] to [{dtype}]")
848844

849845
elif np.issubdtype(arr.dtype, np.floating) and np.issubdtype(dtype, np.integer):
850846

pandas/io/json/_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def to_json(
5353

5454
if not index and orient not in ["split", "table"]:
5555
raise ValueError(
56-
"'index=False' is only valid when 'orient' is " "'split' or 'table'"
56+
"'index=False' is only valid when 'orient' is 'split' or 'table'"
5757
)
5858

5959
path_or_buf = stringify_path(path_or_buf)

pandas/io/json/_table_schema.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ def set_default_names(data):
8181
if len(nms) == 1 and data.index.name == "index":
8282
warnings.warn("Index name of 'index' is not round-trippable")
8383
elif len(nms) > 1 and any(x.startswith("level_") for x in nms):
84-
warnings.warn(
85-
"Index names beginning with 'level_' are not " "round-trippable"
86-
)
84+
warnings.warn("Index names beginning with 'level_' are not round-trippable")
8785
return data
8886

8987
data = data.copy()
@@ -317,12 +315,12 @@ def parse_table_schema(json, precise_float):
317315

318316
# Cannot directly use as_type with timezone data on object; raise for now
319317
if any(str(x).startswith("datetime64[ns, ") for x in dtypes.values()):
320-
raise NotImplementedError('table="orient" can not yet read timezone ' "data")
318+
raise NotImplementedError('table="orient" can not yet read timezone data')
321319

322320
# No ISO constructor for Timedelta as of yet, so need to raise
323321
if "timedelta64" in dtypes.values():
324322
raise NotImplementedError(
325-
'table="orient" can not yet read ' "ISO-formatted Timedelta data"
323+
'table="orient" can not yet read ISO-formatted Timedelta data'
326324
)
327325

328326
df = df.astype(dtypes)

pandas/tests/arithmetic/test_period.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ def test_parr_cmp_pi_mismatched_freq_raises(self, freq, box_with_array):
168168

169169
# TODO: Could parametrize over boxes for idx?
170170
idx = PeriodIndex(["2011", "2012", "2013", "2014"], freq="A")
171-
rev_msg = (
172-
r"Input has different freq=(M|2M|3M) from " r"PeriodArray\(freq=A-DEC\)"
173-
)
171+
rev_msg = r"Input has different freq=(M|2M|3M) from PeriodArray\(freq=A-DEC\)"
174172
idx_msg = rev_msg if box_with_array is tm.to_array else msg
175173
with pytest.raises(IncompatibleFrequency, match=idx_msg):
176174
base <= idx
@@ -184,7 +182,7 @@ def test_parr_cmp_pi_mismatched_freq_raises(self, freq, box_with_array):
184182
Period("2011", freq="4M") >= base
185183

186184
idx = PeriodIndex(["2011", "2012", "2013", "2014"], freq="4M")
187-
rev_msg = r"Input has different freq=(M|2M|3M) from " r"PeriodArray\(freq=4M\)"
185+
rev_msg = r"Input has different freq=(M|2M|3M) from PeriodArray\(freq=4M\)"
188186
idx_msg = rev_msg if box_with_array is tm.to_array else msg
189187
with pytest.raises(IncompatibleFrequency, match=idx_msg):
190188
base <= idx

pandas/tests/arrays/test_timedeltas.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,12 @@ def test_other_type_raises(self):
4141
def test_incorrect_dtype_raises(self):
4242
# TODO: why TypeError for 'category' but ValueError for i8?
4343
with pytest.raises(
44-
ValueError, match=r"category cannot be converted " r"to timedelta64\[ns\]"
44+
ValueError, match=r"category cannot be converted to timedelta64\[ns\]"
4545
):
4646
TimedeltaArray(np.array([1, 2, 3], dtype="i8"), dtype="category")
4747

4848
with pytest.raises(
49-
ValueError,
50-
match=r"dtype int64 cannot be converted " r"to timedelta64\[ns\]",
49+
ValueError, match=r"dtype int64 cannot be converted to timedelta64\[ns\]",
5150
):
5251
TimedeltaArray(np.array([1, 2, 3], dtype="i8"), dtype=np.dtype("int64"))
5352

pandas/tests/base/test_ops.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,7 @@ def test_duplicated_drop_duplicates_index(self):
698698

699699
with pytest.raises(
700700
TypeError,
701-
match=(
702-
r"drop_duplicates\(\) got an " r"unexpected keyword argument"
703-
),
701+
match=r"drop_duplicates\(\) got an unexpected keyword argument",
704702
):
705703
idx.drop_duplicates(inplace=True)
706704

pandas/tests/frame/test_constructors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ def test_constructor_error_msgs(self):
479479
DataFrame(np.zeros((3, 3, 3)), columns=["A", "B", "C"], index=[1])
480480

481481
# wrong size axis labels
482-
msg = "Shape of passed values " r"is \(2, 3\), indices " r"imply \(1, 3\)"
482+
msg = r"Shape of passed values is \(2, 3\), indices imply \(1, 3\)"
483483
with pytest.raises(ValueError, match=msg):
484484
DataFrame(np.random.rand(2, 3), columns=["A", "B", "C"], index=[1])
485485

486-
msg = "Shape of passed values " r"is \(2, 3\), indices " r"imply \(2, 2\)"
486+
msg = r"Shape of passed values is \(2, 3\), indices imply \(2, 2\)"
487487
with pytest.raises(ValueError, match=msg):
488488
DataFrame(np.random.rand(2, 3), columns=["A", "B"], index=[1, 2])
489489

pandas/tests/frame/test_missing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ def test_fillna_invalid_method(self, float_frame):
662662

663663
def test_fillna_invalid_value(self, float_frame):
664664
# list
665-
msg = '"value" parameter must be a scalar or dict, but you passed' ' a "{}"'
665+
msg = '"value" parameter must be a scalar or dict, but you passed a "{}"'
666666
with pytest.raises(TypeError, match=msg.format("list")):
667667
float_frame.fillna([1, 2])
668668
# tuple

pandas/tests/indexes/datetimes/test_tools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ def test_dataframe(self, cache):
12981298
tm.assert_series_equal(result, expected)
12991299

13001300
# extra columns
1301-
msg = "extra keys have been passed to the datetime assemblage: " r"\[foo\]"
1301+
msg = r"extra keys have been passed to the datetime assemblage: \[foo\]"
13021302
with pytest.raises(ValueError, match=msg):
13031303
df2 = df.copy()
13041304
df2["foo"] = 1

pandas/tests/indexing/test_loc.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,7 @@ def test_loc_to_fail(self):
242242
with pytest.raises(KeyError, match=msg):
243243
s.loc[[-1, -2]]
244244

245-
msg = (
246-
r"\"None of \[Index\(\['4'\], dtype='object'\)\] are" r" in the \[index\]\""
247-
)
245+
msg = r"\"None of \[Index\(\['4'\], dtype='object'\)\] are in the \[index\]\""
248246
with pytest.raises(KeyError, match=msg):
249247
s.loc[["4"]]
250248

pandas/tests/io/formats/test_to_csv.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,14 @@ def test_to_csv_string_with_lf(self):
376376
assert f.read() == expected_noarg
377377
with tm.ensure_clean("lf_test.csv") as path:
378378
# case 2: LF as line terminator
379-
expected_lf = b"int,str_lf\n" b"1,abc\n" b'2,"d\nef"\n' b'3,"g\nh\n\ni"\n'
379+
expected_lf = b'int,str_lf\n1,abc\n2,"d\nef"\n3,"g\nh\n\ni"\n'
380380
df.to_csv(path, line_terminator="\n", index=False)
381381
with open(path, "rb") as f:
382382
assert f.read() == expected_lf
383383
with tm.ensure_clean("lf_test.csv") as path:
384384
# case 3: CRLF as line terminator
385385
# 'line_terminator' should not change inner element
386-
expected_crlf = (
387-
b"int,str_lf\r\n" b"1,abc\r\n" b'2,"d\nef"\r\n' b'3,"g\nh\n\ni"\r\n'
388-
)
386+
expected_crlf = b'int,str_lf\r\n1,abc\r\n2,"d\nef"\r\n3,"g\nh\n\ni"\r\n'
389387
df.to_csv(path, line_terminator="\r\n", index=False)
390388
with open(path, "rb") as f:
391389
assert f.read() == expected_crlf
@@ -412,9 +410,7 @@ def test_to_csv_string_with_crlf(self):
412410
assert f.read() == expected_noarg
413411
with tm.ensure_clean("crlf_test.csv") as path:
414412
# case 2: LF as line terminator
415-
expected_lf = (
416-
b"int,str_crlf\n" b"1,abc\n" b'2,"d\r\nef"\n' b'3,"g\r\nh\r\n\r\ni"\n'
417-
)
413+
expected_lf = b'int,str_crlf\n1,abc\n2,"d\r\nef"\n3,"g\r\nh\r\n\r\ni"\n'
418414
df.to_csv(path, line_terminator="\n", index=False)
419415
with open(path, "rb") as f:
420416
assert f.read() == expected_lf

pandas/tests/io/json/test_pandas.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ def test_to_jsonl(self):
12441244
# GH15096: escaped characters in columns and data
12451245
df = DataFrame([["foo\\", "bar"], ['foo"', "bar"]], columns=["a\\", "b"])
12461246
result = df.to_json(orient="records", lines=True)
1247-
expected = '{"a\\\\":"foo\\\\","b":"bar"}\n' '{"a\\\\":"foo\\"","b":"bar"}'
1247+
expected = '{"a\\\\":"foo\\\\","b":"bar"}\n{"a\\\\":"foo\\"","b":"bar"}'
12481248
assert result == expected
12491249
tm.assert_frame_equal(pd.read_json(result, lines=True), df)
12501250

pandas/tests/io/json/test_readlines.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_to_jsonl():
5656
# GH15096: escaped characters in columns and data
5757
df = DataFrame([["foo\\", "bar"], ['foo"', "bar"]], columns=["a\\", "b"])
5858
result = df.to_json(orient="records", lines=True)
59-
expected = '{"a\\\\":"foo\\\\","b":"bar"}\n' '{"a\\\\":"foo\\"","b":"bar"}'
59+
expected = '{"a\\\\":"foo\\\\","b":"bar"}\n{"a\\\\":"foo\\"","b":"bar"}'
6060
assert result == expected
6161
tm.assert_frame_equal(read_json(result, lines=True), df)
6262

pandas/tests/io/json/test_ujson.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def test_encode_decimal(self):
111111
@pytest.mark.parametrize("ensure_ascii", [True, False])
112112
def test_encode_string_conversion(self, ensure_ascii):
113113
string_input = "A string \\ / \b \f \n \r \t </script> &"
114-
not_html_encoded = '"A string \\\\ \\/ \\b \\f \\n ' '\\r \\t <\\/script> &"'
114+
not_html_encoded = '"A string \\\\ \\/ \\b \\f \\n \\r \\t <\\/script> &"'
115115
html_encoded = (
116-
'"A string \\\\ \\/ \\b \\f \\n \\r \\t ' '\\u003c\\/script\\u003e \\u0026"'
116+
'"A string \\\\ \\/ \\b \\f \\n \\r \\t \\u003c\\/script\\u003e \\u0026"'
117117
)
118118

119119
def helper(expected_output, **encode_kwargs):
@@ -816,7 +816,7 @@ def test_array_numpy_labelled(self):
816816

817817
# see gh-10837: write out the dump explicitly
818818
# so there is no dependency on iteration order
819-
input_dumps = '[{"a": 42, "b":31}, {"a": 24, "c": 99}, ' '{"a": 2.4, "b": 78}]'
819+
input_dumps = '[{"a": 42, "b":31}, {"a": 24, "c": 99}, {"a": 2.4, "b": 78}]'
820820
output = ujson.loads(input_dumps, numpy=True, labelled=True)
821821
expected_vals = np.array([42, 31, 24, 99, 2.4, 78], dtype=int).reshape((3, 2))
822822
assert (expected_vals == output[0]).all()

pandas/tests/io/parser/test_common.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1144,9 +1144,8 @@ def test_escapechar(all_parsers):
11441144
StringIO(data), escapechar="\\", quotechar='"', encoding="utf-8"
11451145
)
11461146

1147-
assert result["SEARCH_TERM"][2] == (
1148-
'SLAGBORD, "Bergslagen", ' "IKEA:s 1700-tals serie"
1149-
)
1147+
assert result["SEARCH_TERM"][2] == 'SLAGBORD, "Bergslagen", IKEA:s 1700-tals serie'
1148+
11501149
tm.assert_index_equal(result.columns, Index(["SEARCH_TERM", "ACTUAL_URL"]))
11511150

11521151

pandas/tests/io/parser/test_textreader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def test_header_not_enough_lines(self):
179179
assert_array_dicts_equal(recs, expected)
180180

181181
def test_escapechar(self):
182-
data = '\\"hello world"\n' '\\"hello world"\n' '\\"hello world"'
182+
data = '\\"hello world"\n\\"hello world"\n\\"hello world"'
183183

184184
reader = TextReader(StringIO(data), delimiter=",", header=None, escapechar="\\")
185185
result = reader.read()

pandas/tests/io/pytables/test_store.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3214,7 +3214,7 @@ def test_frame_select_complex(self, setup_path):
32143214
tm.assert_frame_equal(result, expected)
32153215

32163216
result = store.select(
3217-
"df", "(index>df.index[3] & " 'index<=df.index[6]) | string="bar"'
3217+
"df", '(index>df.index[3] & index<=df.index[6]) | string="bar"'
32183218
)
32193219
expected = df.loc[
32203220
((df.index > df.index[3]) & (df.index <= df.index[6]))

pandas/tests/io/test_common.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ def test_read_non_existant(self, reader, module, error_class, fn_ext):
142142

143143
path = os.path.join(HERE, "data", "does_not_exist." + fn_ext)
144144
msg1 = r"File (b')?.+does_not_exist\.{}'? does not exist".format(fn_ext)
145-
msg2 = (
146-
r"\[Errno 2\] No such file or directory: '.+does_not_exist" r"\.{}'"
147-
).format(fn_ext)
145+
msg2 = fr"\[Errno 2\] No such file or directory: '.+does_not_exist\.{fn_ext}'"
148146
msg3 = "Expected object or value"
149147
msg4 = "path_or_buf needs to be a string file path or file-like"
150148
msg5 = (
@@ -180,9 +178,7 @@ def test_read_expands_user_home_dir(
180178
monkeypatch.setattr(icom, "_expand_user", lambda x: os.path.join("foo", x))
181179

182180
msg1 = r"File (b')?.+does_not_exist\.{}'? does not exist".format(fn_ext)
183-
msg2 = (
184-
r"\[Errno 2\] No such file or directory:" r" '.+does_not_exist\.{}'"
185-
).format(fn_ext)
181+
msg2 = fr"\[Errno 2\] No such file or directory: '.+does_not_exist\.{fn_ext}'"
186182
msg3 = "Unexpected character found when decoding 'false'"
187183
msg4 = "path_or_buf needs to be a string file path or file-like"
188184
msg5 = (

pandas/tests/reshape/merge/test_join.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,7 @@ def test_join_on_fails_with_different_right_index(self):
226226
{"a": np.random.choice(["m", "f"], size=10), "b": np.random.randn(10)},
227227
index=tm.makeCustomIndex(10, 2),
228228
)
229-
msg = (
230-
r"len\(left_on\) must equal the number of levels in the index" ' of "right"'
231-
)
229+
msg = r'len\(left_on\) must equal the number of levels in the index of "right"'
232230
with pytest.raises(ValueError, match=msg):
233231
merge(df, df2, left_on="a", right_index=True)
234232

@@ -240,9 +238,7 @@ def test_join_on_fails_with_different_left_index(self):
240238
df2 = DataFrame(
241239
{"a": np.random.choice(["m", "f"], size=10), "b": np.random.randn(10)}
242240
)
243-
msg = (
244-
r"len\(right_on\) must equal the number of levels in the index" ' of "left"'
245-
)
241+
msg = r'len\(right_on\) must equal the number of levels in the index of "left"'
246242
with pytest.raises(ValueError, match=msg):
247243
merge(df, df2, right_on="b", left_index=True)
248244

@@ -737,9 +733,7 @@ def test_join_multi_to_multi(self, join_type):
737733
)
738734
tm.assert_frame_equal(expected, result)
739735

740-
msg = (
741-
r"len\(left_on\) must equal the number of levels in the index" ' of "right"'
742-
)
736+
msg = r'len\(left_on\) must equal the number of levels in the index of "right"'
743737
with pytest.raises(ValueError, match=msg):
744738
left.join(right, on="xy", how=join_type)
745739

pandas/tests/reshape/merge/test_merge.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ def test_overlapping_columns_error_message(self):
744744

745745
# #2649, #10639
746746
df2.columns = ["key1", "foo", "foo"]
747-
msg = r"Data columns not unique: Index\(\['foo', 'foo'\]," r" dtype='object'\)"
747+
msg = r"Data columns not unique: Index\(\['foo', 'foo'\], dtype='object'\)"
748748
with pytest.raises(MergeError, match=msg):
749749
merge(df, df2)
750750

pandas/tests/series/test_constructors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def test_constructor_dtype_datetime64(self):
773773
dts.astype("int64")
774774

775775
# invalid casting
776-
msg = r"cannot astype a datetimelike from \[datetime64\[ns\]\] to" r" \[int32\]"
776+
msg = r"cannot astype a datetimelike from \[datetime64\[ns\]\] to \[int32\]"
777777
with pytest.raises(TypeError, match=msg):
778778
dts.astype("int32")
779779

@@ -1198,7 +1198,7 @@ def test_constructor_dtype_timedelta64(self):
11981198
td.astype("int64")
11991199

12001200
# invalid casting
1201-
msg = r"cannot astype a timedelta from \[timedelta64\[ns\]\] to" r" \[int32\]"
1201+
msg = r"cannot astype a timedelta from \[timedelta64\[ns\]\] to \[int32\]"
12021202
with pytest.raises(TypeError, match=msg):
12031203
td.astype("int32")
12041204

pandas/tests/series/test_dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def test_astype_categorical_to_other(self):
273273
expected = s
274274
tm.assert_series_equal(s.astype("category"), expected)
275275
tm.assert_series_equal(s.astype(CategoricalDtype()), expected)
276-
msg = r"could not convert string to float|" r"invalid literal for float\(\)"
276+
msg = r"could not convert string to float|invalid literal for float\(\)"
277277
with pytest.raises(ValueError, match=msg):
278278
s.astype("float64")
279279

pandas/tests/series/test_missing.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -502,11 +502,11 @@ def test_fillna_int(self):
502502

503503
def test_fillna_raise(self):
504504
s = Series(np.random.randint(-100, 100, 50))
505-
msg = '"value" parameter must be a scalar or dict, but you passed a' ' "list"'
505+
msg = '"value" parameter must be a scalar or dict, but you passed a "list"'
506506
with pytest.raises(TypeError, match=msg):
507507
s.fillna([1, 2])
508508

509-
msg = '"value" parameter must be a scalar or dict, but you passed a' ' "tuple"'
509+
msg = '"value" parameter must be a scalar or dict, but you passed a "tuple"'
510510
with pytest.raises(TypeError, match=msg):
511511
s.fillna((1, 2))
512512

@@ -593,11 +593,11 @@ def test_fillna_categorical_raise(self):
593593
with pytest.raises(ValueError, match="fill value must be in categories"):
594594
s.fillna({1: "d", 3: "a"})
595595

596-
msg = '"value" parameter must be a scalar or ' 'dict, but you passed a "list"'
596+
msg = '"value" parameter must be a scalar or dict, but you passed a "list"'
597597
with pytest.raises(TypeError, match=msg):
598598
s.fillna(["a", "b"])
599599

600-
msg = '"value" parameter must be a scalar or ' 'dict, but you passed a "tuple"'
600+
msg = '"value" parameter must be a scalar or dict, but you passed a "tuple"'
601601
with pytest.raises(TypeError, match=msg):
602602
s.fillna(("a", "b"))
603603

pandas/tests/tslibs/test_parse_iso8601.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ def test_parsers_iso8601_invalid(date_str):
5959

6060
def test_parsers_iso8601_invalid_offset_invalid():
6161
date_str = "2001-01-01 12-34-56"
62-
msg = "Timezone hours offset out of range " 'in datetime string "{s}"'.format(
63-
s=date_str
64-
)
62+
msg = f'Timezone hours offset out of range in datetime string "{date_str}"'
6563

6664
with pytest.raises(ValueError, match=msg):
6765
tslib._test_parse_iso8601(date_str)

pandas/tests/util/test_validate_args_and_kwargs.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def test_duplicate_argument():
7676
kwargs = {"foo": None, "bar": None}
7777
args = (None,) # duplicate value for "foo"
7878

79-
msg = r"{fname}\(\) got multiple values for keyword " r"argument '{arg}'".format(
80-
fname=_fname, arg="foo"
81-
)
79+
msg = fr"{_fname}\(\) got multiple values for keyword argument 'foo'"
8280

8381
with pytest.raises(TypeError, match=msg):
8482
validate_args_and_kwargs(_fname, args, kwargs, min_fname_arg_count, compat_args)

0 commit comments

Comments
 (0)