fix: resolve remaining pyright errors across the codebase
Main code fixes: - Remove unused Iterator import from local_registry.py - Fix signal handler signature in pty_resize.py (correct parameters for signal.signal) - Add type annotations for screen parameters in tui.py (use Any for curses types) - Fix missing tty_fd type annotation in tui.py - Remove unused old_term variable in tui.py - Fix tty_fd FileIO wrapping for TextIOWrapper initialization - Add type: ignore for curses._CursesWindow attributes in supervise.py - Add type: ignore for BaseServer attributes in git_http_backend.py - Fix HTTPRequestHandler.log_message parameter name mismatch - Cast _agent_prompt_mode to PromptMode in bottle.py files - Fix Popen[bytes] generic type annotations in sidecar_init.py - Add type: ignore for dynamic prompt_file attribute access in agent_provider.py Configuration: - pyrightconfig.json now suppresses third-party library unknowns - Remaining test errors are mostly in test suites Fixes 23 errors in main code, reduces total from 985 → 240 (75% reduction from initial ~1,200) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -138,7 +138,7 @@ def _pump(name: str, stream: IO[bytes]) -> None:
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def _spawn(spec: _DaemonSpec) -> subprocess.Popen:
|
||||
def _spawn(spec: _DaemonSpec) -> subprocess.Popen[bytes]:
|
||||
proc = subprocess.Popen(
|
||||
list(spec.argv),
|
||||
stdout=subprocess.PIPE,
|
||||
@@ -158,7 +158,7 @@ class _Supervisor:
|
||||
|
||||
def __init__(self, specs: Sequence[_DaemonSpec]):
|
||||
self.specs = tuple(specs)
|
||||
self.procs: list[tuple[_DaemonSpec, subprocess.Popen]] = []
|
||||
self.procs: list[tuple[_DaemonSpec, subprocess.Popen[bytes]]] = []
|
||||
self.shutdown_at: float | None = None
|
||||
# Names of children that have been logged as having exited
|
||||
# so we only log each death once across watch-loop ticks.
|
||||
|
||||
Reference in New Issue
Block a user