Fixed RUF005 (collection-literal-concatenation)
This commit is contained in:
parent
0e9193651d
commit
e466b9bb53
|
@ -59,7 +59,7 @@ def backup_status(env):
|
|||
"--archive-dir", backup_cache_dir,
|
||||
"--gpg-options", "'--cipher-algo=AES256'",
|
||||
"--log-fd", "1",
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
*get_duplicity_additional_args(env),
|
||||
get_duplicity_target_url(config)
|
||||
],
|
||||
get_duplicity_env_vars(env),
|
||||
|
@ -322,8 +322,8 @@ def perform_backup(full_backup):
|
|||
"--exclude", backup_root,
|
||||
"--volsize", "250",
|
||||
"--gpg-options", "'--cipher-algo=AES256'",
|
||||
"--allow-source-mismatch"
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
"--allow-source-mismatch",
|
||||
*get_duplicity_additional_args(env),
|
||||
env["STORAGE_ROOT"],
|
||||
get_duplicity_target_url(config),
|
||||
],
|
||||
|
@ -344,7 +344,7 @@ def perform_backup(full_backup):
|
|||
"--verbosity", "error",
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--force",
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
*get_duplicity_additional_args(env),
|
||||
get_duplicity_target_url(config)
|
||||
],
|
||||
get_duplicity_env_vars(env))
|
||||
|
@ -360,7 +360,7 @@ def perform_backup(full_backup):
|
|||
"--verbosity", "error",
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--force",
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
*get_duplicity_additional_args(env),
|
||||
get_duplicity_target_url(config)
|
||||
],
|
||||
get_duplicity_env_vars(env))
|
||||
|
@ -399,7 +399,7 @@ def run_duplicity_verification():
|
|||
"--compare-data",
|
||||
"--archive-dir", backup_cache_dir,
|
||||
"--exclude", backup_root,
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
*get_duplicity_additional_args(env),
|
||||
get_duplicity_target_url(config),
|
||||
env["STORAGE_ROOT"],
|
||||
], get_duplicity_env_vars(env))
|
||||
|
@ -412,9 +412,9 @@ def run_duplicity_restore(args):
|
|||
"/usr/bin/duplicity",
|
||||
"restore",
|
||||
"--archive-dir", backup_cache_dir,
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
get_duplicity_target_url(config)
|
||||
] + args,
|
||||
*get_duplicity_additional_args(env),
|
||||
get_duplicity_target_url(config),
|
||||
*args],
|
||||
get_duplicity_env_vars(env))
|
||||
|
||||
def print_duplicity_command():
|
||||
|
@ -426,7 +426,7 @@ def print_duplicity_command():
|
|||
print(f"export {k}={shlex.quote(v)}")
|
||||
print("duplicity", "{command}", shlex.join([
|
||||
"--archive-dir", backup_cache_dir,
|
||||
] + get_duplicity_additional_args(env) + [
|
||||
*get_duplicity_additional_args(env),
|
||||
get_duplicity_target_url(config)
|
||||
]))
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ def check_dns_zone(domain, env, output, dns_zonefiles):
|
|||
secondary_ns = custom_secondary_ns or ["ns2." + env['PRIMARY_HOSTNAME']]
|
||||
|
||||
existing_ns = query_dns(domain, "NS")
|
||||
correct_ns = "; ".join(sorted(["ns1." + env['PRIMARY_HOSTNAME']] + secondary_ns))
|
||||
correct_ns = "; ".join(sorted(["ns1." + env["PRIMARY_HOSTNAME"], *secondary_ns]))
|
||||
ip = query_dns(domain, "A")
|
||||
|
||||
probably_external_dns = False
|
||||
|
|
|
@ -215,7 +215,7 @@ def make_domain_config(domain, templates, ssl_certificates, env):
|
|||
# Combine the pieces. Iteratively place each template into the "# ADDITIONAL DIRECTIVES HERE" placeholder
|
||||
# of the previous template.
|
||||
nginx_conf = "# ADDITIONAL DIRECTIVES HERE\n"
|
||||
for t in templates + [nginx_conf_extra]:
|
||||
for t in [*templates, nginx_conf_extra]:
|
||||
nginx_conf = re.sub("[ \t]*# ADDITIONAL DIRECTIVES HERE *\n", t, nginx_conf)
|
||||
|
||||
# Replace substitution strings in the template & return.
|
||||
|
|
|
@ -181,7 +181,7 @@ def run_test(testfunc, args, count, within_seconds, parallel):
|
|||
# Distribute the requests across the pool.
|
||||
asyncresults = []
|
||||
for i in range(count):
|
||||
ar = p.apply_async(testfunc_runner, [i, testfunc] + list(args))
|
||||
ar = p.apply_async(testfunc_runner, [i, testfunc, *list(args)])
|
||||
asyncresults.append(ar)
|
||||
|
||||
# Wait for all runs to finish.
|
||||
|
|
|
@ -88,7 +88,7 @@ def sslyze(opts, port, ok_ciphers):
|
|||
|
||||
try:
|
||||
# Execute SSLyze.
|
||||
out = subprocess.check_output([SSLYZE] + common_opts + opts + [connection_string])
|
||||
out = subprocess.check_output([SSLYZE, *common_opts, *opts, connection_string])
|
||||
out = out.decode("utf8")
|
||||
|
||||
# Trim output to make better for storing in git.
|
||||
|
|
Loading…
Reference in New Issue