ruff: Fix upcoming ruff lints
Fix upcoming ruff lints to enable the nixpkgs bump
This commit is contained in:
@@ -501,7 +501,7 @@ def setup_filesystems(container: ContainerInfo) -> None:
|
||||
if file.is_symlink():
|
||||
target = file.readlink()
|
||||
sym = container.nix_store_dir / file.name
|
||||
os.symlink(target, sym)
|
||||
sym.symlink_to(target)
|
||||
|
||||
# Read /proc/mounts and replicate every bind mount
|
||||
with Path("/proc/self/mounts").open() as f:
|
||||
|
||||
@@ -94,7 +94,7 @@ class TestHttpBridge:
|
||||
|
||||
def test_http_bridge_middleware_setup(self, http_bridge: tuple) -> None:
|
||||
"""Test that middleware is properly set up."""
|
||||
api, middleware_chain = http_bridge
|
||||
_api, middleware_chain = http_bridge
|
||||
|
||||
# Test that we can create the bridge with middleware
|
||||
# The actual HTTP handling will be tested through the server integration tests
|
||||
|
||||
@@ -144,7 +144,7 @@ def test_machine_delete(
|
||||
) -> None:
|
||||
flake = flake_with_sops
|
||||
|
||||
admin_key, machine_key, machine2_key, *xs = sops_setup.keys
|
||||
admin_key, machine_key, machine2_key, *_xs = sops_setup.keys
|
||||
|
||||
# create a couple machines with their keys
|
||||
for name, key in (("my-machine", machine_key), ("my-machine2", machine2_key)):
|
||||
|
||||
@@ -1440,7 +1440,7 @@ def test_shared_generator_conflicting_definition_raises_error(
|
||||
# because they have conflicting definitions for the same shared generator
|
||||
with pytest.raises(
|
||||
ClanError,
|
||||
match=".*differ.*",
|
||||
match=r".*differ.*",
|
||||
):
|
||||
cli.run(["vars", "generate", "--flake", str(flake.path)])
|
||||
|
||||
|
||||
@@ -842,7 +842,7 @@ class TestGetLlmFinalDecision:
|
||||
):
|
||||
mock_agg.return_value = MagicMock(tools=[mock_schema])
|
||||
|
||||
function_call_results, message = get_llm_final_decision(
|
||||
function_call_results, _message = get_llm_final_decision(
|
||||
user_request="okay then gchq-local as controller and qube-email as moon please everything else as peer",
|
||||
flake=mock_flake,
|
||||
selected_service="zerotier",
|
||||
|
||||
@@ -216,7 +216,7 @@ class TestLogFileCreation:
|
||||
configured_log_manager: LogManager,
|
||||
) -> None:
|
||||
"""Test that creating log file with unregistered group fails."""
|
||||
with pytest.raises(ValueError, match="Group structure.*is not valid"):
|
||||
with pytest.raises(ValueError, match=r"Group structure.*is not valid"):
|
||||
configured_log_manager.create_log_file(
|
||||
example_function,
|
||||
"test_op",
|
||||
@@ -228,7 +228,7 @@ class TestLogFileCreation:
|
||||
configured_log_manager: LogManager,
|
||||
) -> None:
|
||||
"""Test that invalid nested structure fails."""
|
||||
with pytest.raises(ValueError, match="Group structure.*is not valid"):
|
||||
with pytest.raises(ValueError, match=r"Group structure.*is not valid"):
|
||||
configured_log_manager.create_log_file(
|
||||
example_function,
|
||||
"test_op",
|
||||
|
||||
Reference in New Issue
Block a user