refactor(egress): move core type imports to module level
test / unit (pull_request) Successful in 37s
test / integration (pull_request) Successful in 55s
lint / lint (push) Failing after 1m38s
test / unit (push) Failing after 37s
test / integration (push) Successful in 50s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit was merged in pull request #196.
This commit is contained in:
2026-06-05 20:36:12 +00:00
parent abcb336e7c
commit 52820278fd
+6 -4
View File
@@ -15,7 +15,12 @@ from dataclasses import dataclass
from pathlib import Path from pathlib import Path
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from .egress_addon_core import Route from .egress_addon_core import (
HeaderMatch as CoreHeaderMatch,
MatchEntry as CoreMatchEntry,
PathMatch as CorePathMatch,
Route,
)
from .log import die from .log import die
if TYPE_CHECKING: if TYPE_CHECKING:
@@ -62,9 +67,6 @@ class EgressPlan:
def egress_manifest_routes( def egress_manifest_routes(
bottle: Bottle, bottle: Bottle,
) -> tuple[EgressRoute, ...]: ) -> tuple[EgressRoute, ...]:
from .egress_addon_core import MatchEntry as CoreMatchEntry
from .egress_addon_core import PathMatch as CorePathMatch
from .egress_addon_core import HeaderMatch as CoreHeaderMatch
out: list[EgressRoute] = [] out: list[EgressRoute] = []
for r in bottle.egress.routes: for r in bottle.egress.routes:
core_matches: list[CoreMatchEntry] = [] core_matches: list[CoreMatchEntry] = []