@@ -104,13 +104,13 @@ def run(self) -> t.List[Node]:
104
104
prefix , option_name = option [0 ], option [1 :]
105
105
if prefix not in "+-" :
106
106
self .state .document .reporter .warning (
107
- "missing '+' or '-' in '%s ' option." % option ,
107
+ f "missing '+' or '-' in '{ option } ' option." ,
108
108
line = self .lineno ,
109
109
)
110
110
continue
111
111
if option_name not in doctest .OPTIONFLAGS_BY_NAME :
112
112
self .state .document .reporter .warning (
113
- "'%s ' is not a valid option." % option_name ,
113
+ f"' { option_name } ' is not a valid option." ,
114
114
line = self .lineno ,
115
115
)
116
116
continue
@@ -125,7 +125,7 @@ def run(self) -> t.List[Node]:
125
125
node ["options" ][flag ] = True # Skip the test
126
126
except InvalidSpecifier :
127
127
self .state .document .reporter .warning (
128
- "'%s ' is not a valid pyversion option" % spec ,
128
+ f"' { spec } ' is not a valid pyversion option" ,
129
129
line = self .lineno ,
130
130
)
131
131
if "skipif" in self .options :
@@ -288,16 +288,17 @@ def _find(
288
288
289
289
# Find a test for this string, and add it to the list of tests.
290
290
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
+ )
301
302
),
302
303
)
303
304
ext = pathlib .Path (name ).suffix
0 commit comments