Some manual .format() -> f-strings

This commit is contained in:
Anthony Sottile 2020-01-12 11:13:39 -08:00
parent aefbe71765
commit 9000e9dd41
27 changed files with 133 additions and 173 deletions

View file

@ -34,8 +34,7 @@ def check_useless_excludes(config_file: str) -> int:
exclude = config['exclude']
if not exclude_matches_any(classifier.filenames, '', exclude):
print(
'The global exclude pattern {!r} does not match any files'
.format(exclude),
f'The global exclude pattern {exclude!r} does not match any files',
)
retv = 1
@ -50,8 +49,8 @@ def check_useless_excludes(config_file: str) -> int:
include, exclude = hook['files'], hook['exclude']
if not exclude_matches_any(names, include, exclude):
print(
'The exclude pattern {!r} for {} does not match any files'
.format(exclude, hook['id']),
f'The exclude pattern {exclude!r} for {hook["id"]} does '
f'not match any files',
)
retv = 1