Bump pyupgrade target to 3.10+
... according to the versions currently supported. Change-Id: I2f907cb9ce28348236a0d7d062729a5bd6e4901a Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -21,4 +21,4 @@ repos:
|
|||||||
rev: v3.20.0
|
rev: v3.20.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py3-only]
|
args: [--py310-plus]
|
||||||
|
@@ -127,7 +127,7 @@ def main():
|
|||||||
lib_dir = os.getcwd()
|
lib_dir = os.getcwd()
|
||||||
else:
|
else:
|
||||||
lib_dir = os.path.join(repo_root, 'openstack', lib_name)
|
lib_dir = os.path.join(repo_root, 'openstack', lib_name)
|
||||||
print('testing {} in {}'.format(lib_name, lib_dir))
|
print(f'testing {lib_name} in {lib_dir}')
|
||||||
|
|
||||||
projects = set(conf.consumer)
|
projects = set(conf.consumer)
|
||||||
if not projects:
|
if not projects:
|
||||||
@@ -155,7 +155,7 @@ def main():
|
|||||||
# Make sure the lib being tested is set to the reference intended.
|
# Make sure the lib being tested is set to the reference intended.
|
||||||
if conf.ref != 'HEAD':
|
if conf.ref != 'HEAD':
|
||||||
if conf.verbose:
|
if conf.verbose:
|
||||||
print('ensuring {} is updated to {}'.format(lib_name, conf.ref))
|
print(f'ensuring {lib_name} is updated to {conf.ref}')
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
['git', 'checkout', conf.ref],
|
['git', 'checkout', conf.ref],
|
||||||
cwd=lib_dir,
|
cwd=lib_dir,
|
||||||
@@ -177,9 +177,9 @@ def main():
|
|||||||
).communicate()
|
).communicate()
|
||||||
p_log_name = p.split('/')[-1].replace('.', '-')
|
p_log_name = p.split('/')[-1].replace('.', '-')
|
||||||
for e in conf.env:
|
for e in conf.env:
|
||||||
log_name = 'cross-test-{}-{}.log'.format(p_log_name, e)
|
log_name = f'cross-test-{p_log_name}-{e}.log'
|
||||||
with open(log_name, 'w') as log_file:
|
with open(log_name, 'w') as log_file:
|
||||||
print('testing {} in {}, logging to {}'.format(e, p, log_name),
|
print(f'testing {e} in {p}, logging to {log_name}',
|
||||||
end=' ')
|
end=' ')
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
command = ['oslo_run_cross_tests', proj_dir, e]
|
command = ['oslo_run_cross_tests', proj_dir, e]
|
||||||
|
Reference in New Issue
Block a user