enable more linting

This commit is contained in:
Jörg Thalheim
2023-11-29 12:38:00 +01:00
committed by Mic92
parent 7ae02d86af
commit 26e3e3872c
15 changed files with 54 additions and 54 deletions

View File

@@ -456,7 +456,8 @@ class Host:
else:
bash_cmd += cmd
# FIXME we assume bash to be present here? Should be documented...
ssh_cmd = self.ssh_cmd(verbose_ssh=verbose_ssh) + [
ssh_cmd = [
*self.ssh_cmd(verbose_ssh=verbose_ssh),
"--",
f"{sudo}bash -c {quote(bash_cmd)} -- {' '.join(map(quote, bash_args))}",
]
@@ -497,7 +498,7 @@ class Host:
if verbose_ssh or self.verbose_ssh:
ssh_opts.extend(["-v"])
return ["ssh", ssh_target] + ssh_opts
return ["ssh", ssh_target, *ssh_opts]
T = TypeVar("T")

View File

@@ -21,7 +21,8 @@ def ssh(
"-p",
password,
]
_ssh_args = ssh_args + [
_ssh_args = [
*ssh_args,
"ssh",
"-o",
"UserKnownHostsFile=/dev/null",
@@ -29,7 +30,7 @@ def ssh(
"StrictHostKeyChecking=no",
f"{user}@{host}",
]
cmd = nix_shell(packages, ["torify"] + password_args + _ssh_args)
cmd = nix_shell(packages, ["torify", *password_args, *_ssh_args])
subprocess.run(cmd)