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:
@@ -26,4 +26,4 @@ repos:
|
||||
rev: v3.20.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: [--py3-only]
|
||||
args: [--py310-plus]
|
||||
|
@@ -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('')
|
||||
|
@@ -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,
|
||||
|
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user