From 9954273d2657f003cc2fcc9dd669c3480630360d Mon Sep 17 00:00:00 2001 From: claude Date: Sat, 6 Jun 2026 17:48:51 +0000 Subject: [PATCH] fix(types): resolve pyright errors in test_egress_addon_core --- tests/unit/test_egress_addon_core.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/unit/test_egress_addon_core.py b/tests/unit/test_egress_addon_core.py index 31f17fa..8d2986a 100644 --- a/tests/unit/test_egress_addon_core.py +++ b/tests/unit/test_egress_addon_core.py @@ -18,7 +18,6 @@ from bot_bottle.egress_addon_core import ( MatchEntry, PathMatch, Route, - ScanResult, build_outbound_scan_text, decide, evaluate_matches, @@ -668,16 +667,22 @@ class TestGitPushBlockFailFast(unittest.TestCase): class TestBuildOutboundScanText(unittest.TestCase): - def _build(self, **kwargs): - defaults = dict( - host="api.example.com", - path="/v1/data", - query="", - headers={}, - body="", + def _build( + self, + *, + host: str = "api.example.com", + path: str = "/v1/data", + query: str = "", + headers: dict[str, str] | None = None, + body: str = "", + ) -> str: + return build_outbound_scan_text( + host=host, + path=path, + query=query, + headers=headers or {}, + body=body, ) - defaults.update(kwargs) - return build_outbound_scan_text(**defaults) def test_host_appears(self): text = self._build(host="secret.attacker.com")