Linting
This commit is contained in:
parent
41248fe396
commit
cc93997230
|
@ -39,10 +39,7 @@ def cli():
|
|||
# The process (if any) that is our LZ4 decompressor.
|
||||
lz4_process = None
|
||||
|
||||
dump_command = [
|
||||
"pg_dump",
|
||||
database_to_use
|
||||
]
|
||||
dump_command = ["pg_dump", database_to_use]
|
||||
|
||||
if host_to_use is not None:
|
||||
if use_lz4:
|
||||
|
@ -63,21 +60,19 @@ def cli():
|
|||
# (rather than lz4 covering it).
|
||||
command = [
|
||||
"ssh",
|
||||
f"{user_to_use}@{host_to_use}" if user_to_use is not None else f"{host_to_use}",
|
||||
f"{user_to_use}@{host_to_use}"
|
||||
if user_to_use is not None
|
||||
else f"{host_to_use}",
|
||||
"bash",
|
||||
"-o",
|
||||
"pipefail",
|
||||
"-c",
|
||||
shlex.quote(" ".join(dump_command))
|
||||
shlex.quote(" ".join(dump_command)),
|
||||
]
|
||||
elif user_to_use is not None:
|
||||
current_username = pwd.getpwuid(os.getuid()).pw_name
|
||||
if current_username != user_to_use:
|
||||
command = [
|
||||
"sudo",
|
||||
"-u",
|
||||
user_to_use
|
||||
] + dump_command
|
||||
command = ["sudo", "-u", user_to_use] + dump_command
|
||||
else:
|
||||
command = dump_command
|
||||
else:
|
||||
|
|
|
@ -251,7 +251,8 @@ kind = {{ stdout = "blahblah.txt" }}
|
|||
seed = 7555
|
||||
print(f"seed: {seed}")
|
||||
rng.seed(seed)
|
||||
# min_files is 8 because we need enough files to use each label for this test to succeed.
|
||||
# min_files is 8 because we need enough files to use each label for this
|
||||
# test to succeed.
|
||||
initial_descriptor, _ = generate_random_dir(rng, src_path, 32, min_files=8)
|
||||
labellings = generate_labels(initial_descriptor, rng)
|
||||
save_labelling_rules(labelling_path.joinpath("srca.zst"), labellings)
|
||||
|
|
Loading…
Reference in New Issue