Skip to content

Commit df756eb

Browse files
committed
Fix incorrect variable names in f-strings
1 parent 1bc0119 commit df756eb

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

control/tests/ctrlplot_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def test_plot_title_processing(resp_fcn, plot_fcn):
514514
case ct.input_output_response, _:
515515
title_prefix = "Input/output response for "
516516
case _:
517-
raise RuntimeError(f"didn't recognize {resp_fnc}, {plot_fnc}")
517+
raise RuntimeError(f"didn't recognize {resp_fcn}, {plot_fcn}")
518518

519519
# Generate the first plot, with default title
520520
cplt1 = plot_fcn(*args1, **kwargs, **plot_kwargs)

control/tests/docstrings_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def test_deprecated_functions(module, prefix):
309309

310310
# Get the docstring (skip w/ warning if there isn't one)
311311
if obj.__doc__ is None:
312-
_warn(f"{objname} is missing docstring")
312+
_warn(f"{obj} is missing docstring")
313313
continue
314314
else:
315315
docstring = inspect.getdoc(obj)
@@ -320,13 +320,13 @@ def test_deprecated_functions(module, prefix):
320320
if ".. deprecated::" in doc_extended:
321321
# Make sure a FutureWarning is issued
322322
if not re.search("FutureWarning", source):
323-
_fail(f"{objname} deprecated but does not issue "
323+
_fail(f"{obj} deprecated but does not issue "
324324
"FutureWarning")
325325
else:
326326
if re.search(name + r"(\(\))? is deprecated", docstring) or \
327327
re.search(name + r"(\(\))? is deprecated", source):
328328
_fail(
329-
f"{objname} deprecated but with non-standard "
329+
f"{obj} deprecated but with non-standard "
330330
"docs/warnings")
331331

332332
#

0 commit comments

Comments
 (0)