fix(types): add BottleSpec.loaded_manifest to satisfy pyright on union type
lint / lint (push) Successful in 1m43s
test / unit (pull_request) Successful in 36s
test / integration (pull_request) Successful in 18s

BottleSpec.manifest is ManifestIndex | Manifest (pre/post _validate()).
Downstream code always runs post-validate so it needs Manifest, but
pyright flagged every .agent/.bottle access. The new loaded_manifest
property asserts isinstance and returns Manifest, giving pyright a
narrowed type without scattering type: ignore everywhere.

Also remove unused Manifest imports from test files and annotate the
_index() helper in test_manifest_agent_git_user.
This commit is contained in:
2026-06-23 02:08:27 +00:00
parent fa0a5fbb9c
commit 910b601a5e
16 changed files with 31 additions and 22 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ from bot_bottle.backend import Bottle, BottleSpec, ExecResult
from bot_bottle.backend.docker.bottle_plan import DockerBottlePlan
from bot_bottle.egress import EgressPlan
from bot_bottle.git_gate import GitGatePlan
from bot_bottle.manifest import Manifest, ManifestIndex
from bot_bottle.manifest import ManifestIndex
class _Provider(AgentProvider):