diff --git a/lib/test/container-test-driver/test_driver/__init__.py b/lib/test/container-test-driver/test_driver/__init__.py index 26f61326c..2a4a25092 100644 --- a/lib/test/container-test-driver/test_driver/__init__.py +++ b/lib/test/container-test-driver/test_driver/__init__.py @@ -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: diff --git a/pkgs/clan-app/clan_app/backends/http/test_http_api.py b/pkgs/clan-app/clan_app/backends/http/test_http_api.py index 7e2a8fd11..7820f36c6 100644 --- a/pkgs/clan-app/clan_app/backends/http/test_http_api.py +++ b/pkgs/clan-app/clan_app/backends/http/test_http_api.py @@ -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 diff --git a/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py b/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py index 145234ec4..2760422a3 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py +++ b/pkgs/clan-cli/clan_cli/tests/test_machines_cli.py @@ -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)): diff --git a/pkgs/clan-cli/clan_cli/tests/test_vars.py b/pkgs/clan-cli/clan_cli/tests/test_vars.py index 9f0e80eb5..def6a3112 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_vars.py +++ b/pkgs/clan-cli/clan_cli/tests/test_vars.py @@ -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)]) diff --git a/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py b/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py index 20977dc3a..29dc03d26 100644 --- a/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py +++ b/pkgs/clan-cli/clan_lib/llm/test_process_chat_turn.py @@ -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", diff --git a/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py b/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py index a50c1b254..cd23826d8 100644 --- a/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py +++ b/pkgs/clan-cli/clan_lib/log_manager/test_log_manager.py @@ -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",