Bump pyupgrade target to 3.10+

... according to the versions currently supported.

Change-Id: I3fa7678d02a8e1437bc59259be0f2738857cf5ee
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-10-05 19:44:20 +09:00
parent 343b0bed51
commit 9092d990b9
4 changed files with 5 additions and 5 deletions

View File

@@ -26,4 +26,4 @@ repos:
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py3-only]
args: [--py310-plus]

View File

@@ -45,7 +45,7 @@ if __name__ == '__main__':
results = mgr.map(format_data, data)
for name, result in results:
print('Formatter: {}'.format(name))
print(f'Formatter: {name}')
for chunk in result:
print(chunk, end='')
print('')

View File

@@ -33,7 +33,7 @@ def _simple_list(mgr):
ext = mgr[name]
doc = _get_docstring(ext.plugin) or '\n'
summary = doc.splitlines()[0].strip()
yield ('* {} -- {}'.format(ext.name, summary),
yield (f'* {ext.name} -- {summary}',
ext.module_name)
@@ -82,7 +82,7 @@ class ListPluginsDirective(rst.Directive):
underline_style = self.options.get('underline-style', '=')
def report_load_failure(mgr, ep, err):
LOG.warning('Failed to load {}: {}'.format(ep.module, err))
LOG.warning(f'Failed to load {ep.module}: {err}')
mgr = extension.ExtensionManager(
namespace,

View File

@@ -25,7 +25,7 @@ def _make_ext(name, docstring):
inner.__doc__ = docstring
m1 = importlib_metadata.EntryPoint(
name, '{}_module:{}'.format(name, name), 'group',
name, f'{name}_module:{name}', 'group',
)
return extension.Extension(name, m1, inner, None)