fix: remove redundant quoted annotations in BottleImages and abstract methods
lint / lint (push) Failing after 2m5s
test / unit (pull_request) Successful in 1m1s
test / integration (pull_request) Successful in 18s
test / coverage (pull_request) Successful in 1m9s

`from __future__ import annotations` already defers all annotation
evaluation, so quoting `str | Path`, `BottleImages` inside the same
module was redundant and tripped pyright strict mode.
This commit is contained in:
2026-07-10 20:36:19 +00:00
parent 99872e39cd
commit 924b122e2b
+4 -4
View File
@@ -284,8 +284,8 @@ class BottleImages:
image refs. For the smolmachines backend they are Path objects pointing image refs. For the smolmachines backend they are Path objects pointing
to pre-built `.smolmachine` artifacts.""" to pre-built `.smolmachine` artifacts."""
agent: "str | Path" agent: str | Path
sidecar: "str | Path" sidecar: str | Path
class BottleBackend(ABC, Generic[PlanT, CleanupT]): class BottleBackend(ABC, Generic[PlanT, CleanupT]):
@@ -461,12 +461,12 @@ class BottleBackend(ABC, Generic[PlanT, CleanupT]):
yield bottle yield bottle
@abstractmethod @abstractmethod
def _build_or_load_images(self, plan: PlanT) -> "BottleImages": def _build_or_load_images(self, plan: PlanT) -> BottleImages:
"""Return the agent and sidecar image references (or artifact paths) """Return the agent and sidecar image references (or artifact paths)
for this plan, building fresh images when the policy requires it.""" for this plan, building fresh images when the policy requires it."""
@abstractmethod @abstractmethod
def _launch_impl(self, plan: PlanT, images: "BottleImages") -> AbstractContextManager[Bottle]: def _launch_impl(self, plan: PlanT, images: BottleImages) -> AbstractContextManager[Bottle]:
"""Bring up the bottle using pre-resolved images; yield a handle; tear down on exit.""" """Bring up the bottle using pre-resolved images; yield a handle; tear down on exit."""
def provision(self, plan: PlanT, bottle: "Bottle") -> str | None: def provision(self, plan: PlanT, bottle: "Bottle") -> str | None: