From 688e4cd546f8eed1278a22265b9d3ade8c0e9bca Mon Sep 17 00:00:00 2001 From: codex Date: Wed, 1 Jul 2026 21:10:33 +0000 Subject: [PATCH] test(smolmachines): annotate pyright test helpers --- tests/unit/test_smolmachines_loopback_alias.py | 2 +- tests/unit/test_smolmachines_util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_smolmachines_loopback_alias.py b/tests/unit/test_smolmachines_loopback_alias.py index b020821..7847dc3 100644 --- a/tests/unit/test_smolmachines_loopback_alias.py +++ b/tests/unit/test_smolmachines_loopback_alias.py @@ -361,7 +361,7 @@ class TestForceAllowlist(unittest.TestCase): # force_allowlist must fail closed rather than boot the VM. original = loopback_alias._read_machine_cfg - def stale_cfg(con, name): + def stale_cfg(con: sqlite3.Connection, name: str) -> dict[str, object]: # Always report the un-patched row so the post-write # verification never sees the requested cidrs. cfg = original(con, name) diff --git a/tests/unit/test_smolmachines_util.py b/tests/unit/test_smolmachines_util.py index 4d932aa..5192c7c 100644 --- a/tests/unit/test_smolmachines_util.py +++ b/tests/unit/test_smolmachines_util.py @@ -97,7 +97,7 @@ class TestKvmPreflight(unittest.TestCase): """Linux-only KVM gate: smolvm needs /dev/kvm present and accessible. macOS skips this entirely (Hypervisor.framework).""" - def _run(self, *, system, exists, access): + def _run(self, *, system: str, exists: bool, access: bool) -> None: with patch( "bot_bottle.backend.smolmachines.util.shutil.which", return_value="/usr/bin/smolvm",