Skip to content

Commit 73a0170

Browse files
committed
fix: resolve mypy type errors in TUI app and build_log screen
1 parent 6cdd0ca commit 73a0170

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

fuzzforge-cli/src/fuzzforge_cli/tui/app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
_AgentRow = tuple[str, "AIAgent", Path, str, bool]
3636

3737

38-
class SingleClickDataTable(DataTable):
38+
class SingleClickDataTable(DataTable[Any]):
3939
"""DataTable subclass that also fires ``RowClicked`` on a single mouse click.
4040
4141
Textual's built-in ``RowSelected`` only fires on Enter or on a second click
@@ -56,7 +56,7 @@ def control(self) -> SingleClickDataTable:
5656
"""Return the data table that fired this event."""
5757
return self.data_table
5858

59-
async def _on_click(self, event: events.Click) -> None: # type: ignore[override]
59+
async def _on_click(self, event: events.Click) -> None:
6060
"""Forward to parent, then post RowClicked on every mouse click.
6161
6262
The hub table is handled exclusively via RowClicked. RowSelected is
@@ -450,9 +450,10 @@ def _handle_hub_row(self, idx: int) -> None:
450450

451451
self._build_dialog_open = True
452452

453-
def _on_build_dialog_done(confirmed: bool, sn: str = server_name, im: str = image, hn: str = hub_name) -> None:
453+
def _on_build_dialog_done(result: bool | None) -> None:
454454
self._build_dialog_open = False
455-
self._on_build_confirmed(confirmed, sn, im, hn)
455+
if result is not None:
456+
self._on_build_confirmed(result, server_name, image, hub_name)
456457

457458
self.push_screen(
458459
BuildImageScreen(server_name, image, hub_name),

fuzzforge-cli/src/fuzzforge_cli/tui/screens/build_log.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
from __future__ import annotations
1010

11+
from typing import Any
12+
1113
from textual.app import ComposeResult
1214
from textual.containers import Horizontal, Vertical
1315
from textual.screen import ModalScreen
@@ -51,13 +53,13 @@ def _flush_log(self) -> None:
5153
log_widget.write_line(line)
5254
self._last_line += len(new_lines)
5355

54-
active: dict = getattr(self.app, "_active_builds", {})
56+
active: dict[str, Any] = getattr(self.app, "_active_builds", {})
5557
status = self.query_one("#build-status", Label)
5658
if self._image in active:
5759
status.update("[yellow]⏳ Building…[/yellow]")
5860
else:
5961
# Build is done — check if we have a result stored
60-
results: dict = getattr(self.app, "_build_results", {})
62+
results: dict[str, Any] = getattr(self.app, "_build_results", {})
6163
if self._image in results:
6264
if results[self._image]:
6365
status.update(f"[green]✓ {self._image} built successfully[/green]")

0 commit comments

Comments
 (0)