fix: resolve pyright type errors

- Fix launch.py provision callable signature to accept Bottle not str
- Rename _prompt_path to prompt_path to make it public (not protected)
- Fix PromptMode type handling in bottle.py files
- Update WorkspaceSpec protocol to use read-only properties for compatibility with frozen BottleSpec
- Fix pty_resize signal handler type annotation
- Update local_registry.py contextmanager return type to Generator (not Iterator)

These changes fix ~130 pyright errors related to type safety.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-03 23:25:41 -04:00
parent 58169e2ce9
commit 0bf1532557
7 changed files with 20 additions and 13 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ class DockerBottle(Bottle):
):
self.name = container
self._teardown = teardown
self._prompt_path = prompt_path_in_container
self.prompt_path = prompt_path_in_container
self._agent_prompt_mode = agent_prompt_mode
self.agent_command = agent_command
self.agent_provider_template = (
@@ -36,7 +36,7 @@ class DockerBottle(Bottle):
) -> list[str]:
full_argv = list(argv)
full_argv.extend(
prompt_args(self._agent_prompt_mode, self._prompt_path, argv=full_argv)
prompt_args(self._agent_prompt_mode, self.prompt_path, argv=full_argv)
)
cmd = ["docker", "exec"]
if tty: