@@ -104,13 +104,13 @@ def run(self) -> t.List[Node]:
104104 prefix , option_name = option [0 ], option [1 :]
105105 if prefix not in "+-" :
106106 self .state .document .reporter .warning (
107- "missing '+' or '-' in '%s ' option." % option ,
107+ f "missing '+' or '-' in '{ option } ' option." ,
108108 line = self .lineno ,
109109 )
110110 continue
111111 if option_name not in doctest .OPTIONFLAGS_BY_NAME :
112112 self .state .document .reporter .warning (
113- "'%s ' is not a valid option." % option_name ,
113+ f"' { option_name } ' is not a valid option." ,
114114 line = self .lineno ,
115115 )
116116 continue
@@ -125,7 +125,7 @@ def run(self) -> t.List[Node]:
125125 node ["options" ][flag ] = True # Skip the test
126126 except InvalidSpecifier :
127127 self .state .document .reporter .warning (
128- "'%s ' is not a valid pyversion option" % spec ,
128+ f"' { spec } ' is not a valid pyversion option" ,
129129 line = self .lineno ,
130130 )
131131 if "skipif" in self .options :
@@ -288,16 +288,17 @@ def _find(
288288
289289 # Find a test for this string, and add it to the list of tests.
290290 logger .debug (
291- "_find(%s)"
292- % pprint .pformat (
293- {
294- "tests" : tests ,
295- "string" : string ,
296- "name" : name ,
297- "source_lines" : source_lines ,
298- "globs" : globs ,
299- "seen" : seen ,
300- },
291+ "_find({})" .format (
292+ pprint .pformat (
293+ {
294+ "tests" : tests ,
295+ "string" : string ,
296+ "name" : name ,
297+ "source_lines" : source_lines ,
298+ "globs" : globs ,
299+ "seen" : seen ,
300+ },
301+ )
301302 ),
302303 )
303304 ext = pathlib .Path (name ).suffix
0 commit comments