@@ -103,7 +103,7 @@ def test_parameter_docs(module, prefix):
103103 if inspect .getmodule (obj ) is not None and \
104104 not inspect .getmodule (obj ).__name__ .startswith ('control' ):
105105 # Skip anything that isn't part of the control package
106- _info (f"member '{ name } ' is outside `control` module" , 5 )
106+ _info (f"member '{ objname } ' is outside `control` module" , 5 )
107107 continue
108108
109109 # Skip non-top-level functions without parameter lists
@@ -285,7 +285,7 @@ def test_deprecated_functions(module, prefix):
285285
286286 # Get the docstring (skip w/ warning if there isn't one)
287287 if obj .__doc__ is None :
288- _warn (f"{ module . __name__ } . { name } is missing docstring" )
288+ _warn (f"{ objname } is missing docstring" )
289289 continue
290290 else :
291291 docstring = inspect .getdoc (obj )
@@ -296,12 +296,14 @@ def test_deprecated_functions(module, prefix):
296296 if ".. deprecated::" in doc_extended :
297297 # Make sure a FutureWarning is issued
298298 if not re .search ("FutureWarning" , source ):
299- _fail (f"{ name } deprecated but does not issue FutureWarning" )
299+ _fail (f"{ objname } deprecated but does not issue "
300+ "FutureWarning" )
300301 else :
301302 if re .search (name + r"(\(\))? is deprecated" , docstring ) or \
302303 re .search (name + r"(\(\))? is deprecated" , source ):
303304 _fail (
304- f"{ name } deprecated but w/ non-standard docs/warnings" )
305+ f"{ objname } deprecated but with non-standard "
306+ "docs/warnings" )
305307
306308#
307309# Tests for I/O system classes
@@ -721,6 +723,7 @@ def _replace_var_positional_with_docstring(sig, doc):
721723 # Return the new signature
722724 return sig .replace (parameters = parameter_list )
723725
726+
724727# Utility function to warn with verbose output
725728def _info (str , level ):
726729 if verbose > level :
0 commit comments