automatic ruff fixes
This commit is contained in:
@@ -19,7 +19,8 @@ def list_command(args: argparse.Namespace) -> None:
|
||||
col_network = max(12, *(len(name) for name in networks))
|
||||
col_priority = 8
|
||||
col_module = max(
|
||||
10, *(len(net.module_name.split(".")[-1]) for net in networks.values())
|
||||
10,
|
||||
*(len(net.module_name.split(".")[-1]) for net in networks.values()),
|
||||
)
|
||||
col_running = 8
|
||||
|
||||
|
||||
@@ -1146,8 +1146,7 @@ def test_share_mode_switch_regenerates_secret(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
flake_with_sops: ClanFlake,
|
||||
) -> None:
|
||||
"""
|
||||
Test that switching a generator from share=false to share=true
|
||||
"""Test that switching a generator from share=false to share=true
|
||||
causes the secret to be regenerated with a new value.
|
||||
"""
|
||||
flake = flake_with_sops
|
||||
|
||||
@@ -555,7 +555,8 @@ class FlakeCacheEntry:
|
||||
|
||||
# string and maybe work the same for cache checking
|
||||
if (selector.type in (SelectorType.STR, SelectorType.MAYBE)) and isinstance(
|
||||
self.value, dict
|
||||
self.value,
|
||||
dict,
|
||||
):
|
||||
if not isinstance(selector.value, str):
|
||||
msg = f"Expected str for STR/MAYBE selector value in caching, got {type(selector.value)}"
|
||||
|
||||
@@ -43,7 +43,10 @@ def test_sandbox_denies_write_to_home() -> None:
|
||||
|
||||
with sandbox_exec_cmd(script, tmpdir_path) as cmd:
|
||||
result = subprocess.run(
|
||||
cmd, check=False, capture_output=True, text=True
|
||||
cmd,
|
||||
check=False,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
|
||||
# Check that either the write was denied or the file wasn't created
|
||||
|
||||
@@ -172,7 +172,10 @@ class Remote:
|
||||
]
|
||||
exit_cmd.append(remote.target)
|
||||
subprocess.run(
|
||||
exit_cmd, check=False, capture_output=True, timeout=5
|
||||
exit_cmd,
|
||||
check=False,
|
||||
capture_output=True,
|
||||
timeout=5,
|
||||
)
|
||||
except (subprocess.TimeoutExpired, subprocess.CalledProcessError):
|
||||
# If exit fails still try to stop the master connection
|
||||
|
||||
@@ -134,7 +134,9 @@ def get_machine_disk_schemas(
|
||||
|
||||
raw_readme = (disk_template / "README.md").read_text()
|
||||
frontmatter, readme = extract_frontmatter(
|
||||
raw_readme, f"{disk_template}/README.md", fm_class=DiskManifest
|
||||
raw_readme,
|
||||
f"{disk_template}/README.md",
|
||||
fm_class=DiskManifest,
|
||||
)
|
||||
|
||||
disk_schemas[schema_name] = DiskSchema(
|
||||
|
||||
Reference in New Issue
Block a user