fix(types): resolve pyright errors in test_egress_addon_core
lint / lint (push) Successful in 1m23s
test / unit (pull_request) Successful in 30s
test / integration (pull_request) Successful in 43s

This commit is contained in:
2026-06-06 17:48:51 +00:00
parent 4515c9e8ad
commit 9954273d26
+15 -10
View File
@@ -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")