fix(types): add BottleSpec.loaded_manifest to satisfy pyright on union type
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:
@@ -240,7 +240,7 @@ class AgentProvider(ABC):
|
||||
BottleBackend.provision_workspace against the running bottle."""
|
||||
from .log import info
|
||||
|
||||
manifest_bottle = plan.spec.manifest.bottle
|
||||
manifest_bottle = plan.spec.loaded_manifest.bottle
|
||||
if manifest_bottle.git:
|
||||
from .git_gate import GIT_GATE_HOSTNAME, git_gate_render_gitconfig
|
||||
gate_host = getattr(plan, "git_gate_insteadof_host", GIT_GATE_HOSTNAME)
|
||||
|
||||
Reference in New Issue
Block a user