Skip to content

Commit e9a2a10

Browse files
committedMar 31, 2021
audit % format calls
1 parent c4c4351 commit e9a2a10

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
 

‎src/flake8/options/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def get_local_plugins(config_finder):
344344

345345
base_dirs = {os.path.dirname(cf) for cf in config_files}
346346

347-
section = "%s:local-plugins" % config_finder.program_name
347+
section = f"{config_finder.program_name}:local-plugins"
348348
for plugin_type in ["extension", "report"]:
349349
if config.has_option(section, plugin_type):
350350
local_plugins_string = config.get(section, plugin_type).strip()

‎src/flake8/plugins/manager.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ def _load(self):
138138
self._plugin = self.entry_point.load()
139139
if not callable(self._plugin):
140140
msg = (
141-
"Plugin %r is not a callable. It might be written for an"
142-
" older version of flake8 and might not work with this"
143-
" version" % self._plugin
141+
f"Plugin {self._plugin!r} is not a callable. It might be "
142+
f"written for an older version of flake8 and might not work "
143+
f"with this version"
144144
)
145145
LOG.critical(msg)
146146
raise TypeError(msg)

‎src/flake8/plugins/pyflakes.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ def parse_options(cls, options):
165165
)
166166
if inc_exc:
167167
raise ValueError(
168-
'"%s" was specified in both the '
169-
"include-in-doctest and exclude-from-doctest "
170-
"options. You are not allowed to specify it in "
171-
"both for doctesting." % inc_exc
168+
f"{inc_exc!r} was specified in both the "
169+
f"include-in-doctest and exclude-from-doctest "
170+
f"options. You are not allowed to specify it in "
171+
f"both for doctesting."
172172
)
173173

174174
def run(self):

‎src/flake8/processor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def log_token(log: logging.Logger, token: _Token) -> None:
438438
if token[2][0] == token[3][0]:
439439
pos = "[{}:{}]".format(token[2][1] or "", token[3][1])
440440
else:
441-
pos = "l.%s" % token[3][0]
441+
pos = f"l.{token[3][0]}"
442442
log.log(
443443
flake8._EXTRA_VERBOSE,
444444
"l.%s\t%s\t%s\t%r"

0 commit comments

Comments
 (0)
Please sign in to comment.