Skip to content

Commit ab7c3a8

Browse files
committed
fixed lint
1 parent 0a83f13 commit ab7c3a8

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

src/tui/screens/monitor.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,33 @@
33
import asyncio
44
import re
55
import shutil
6+
from collections.abc import AsyncIterator
67
from pathlib import Path
7-
from typing import Literal, Any, Optional, AsyncIterator
8-
9-
# Define button variant type
10-
ButtonVariant = Literal["default", "primary", "success", "warning", "error"]
8+
from typing import Literal
119

10+
from rich.text import Text
1211
from textual.app import ComposeResult
13-
from textual.containers import Container, Vertical, Horizontal, ScrollableContainer
12+
from textual.containers import Horizontal, ScrollableContainer
1413
from textual.screen import Screen
15-
from textual.widgets import Header, Footer, Static, Button, DataTable
16-
from textual.timer import Timer
17-
from rich.text import Text
18-
from rich.table import Table
14+
from textual.widgets import Button, DataTable, Footer, Static
1915

2016
from ..managers.container_manager import (
2117
ContainerManager,
22-
ServiceStatus,
2318
ServiceInfo,
19+
ServiceStatus,
2420
format_port_conflict_message,
2521
)
2622
from ..managers.docling_manager import DoclingManager
2723
from ..utils.platform import RuntimeType
2824
from ..widgets.command_modal import CommandOutputModal
29-
from ..widgets.flow_backup_warning_modal import FlowBackupWarningModal
25+
from ..widgets.diagnostics_notification import notify_with_diagnostics
3026
from ..widgets.factory_reset_warning_modal import FactoryResetWarningModal
31-
from ..widgets.version_mismatch_warning_modal import VersionMismatchWarningModal
27+
from ..widgets.flow_backup_warning_modal import FlowBackupWarningModal
3228
from ..widgets.upgrade_instructions_modal import UpgradeInstructionsModal
33-
from ..widgets.diagnostics_notification import notify_with_diagnostics
29+
from ..widgets.version_mismatch_warning_modal import VersionMismatchWarningModal
30+
31+
# Define button variant type
32+
ButtonVariant = Literal["default", "primary", "success", "warning", "error"]
3433

3534

3635
class MonitorScreen(Screen):
@@ -201,7 +200,7 @@ async def _refresh_services(self) -> None:
201200
self.images_table.clear()
202201

203202
# Add container service rows
204-
for service_name, service_info in services.items():
203+
for _service_name, service_info in services.items():
205204
status_style = self._get_status_style(service_info.status)
206205

207206
self.services_table.add_row(
@@ -277,7 +276,6 @@ async def _auto_refresh(self) -> None:
277276
def on_button_pressed(self, event: Button.Pressed) -> None:
278277
"""Handle button presses."""
279278
button_id = event.button.id or ""
280-
button_label = event.button.label or ""
281279

282280
# Use button ID prefixes to determine action, ignoring any random suffix
283281
if button_id.startswith("start-btn"):
@@ -322,7 +320,7 @@ def on_button_pressed(self, event: Button.Pressed) -> None:
322320
self.run_worker(self._show_logs(service_name))
323321
self._start_follow(service_name)
324322

325-
async def _start_services(self, cpu_mode: Optional[bool] = None) -> None:
323+
async def _start_services(self, cpu_mode: bool | None = None) -> None:
326324
"""Start services with progress updates."""
327325
self.operation_in_progress = True
328326
try:
@@ -617,6 +615,7 @@ async def _prune_images(self) -> None:
617615
def _check_flow_backups(self) -> bool:
618616
"""Check if there are any flow backups in flows/backup directory."""
619617
from pathlib import Path
618+
620619
from ..managers.env_manager import EnvManager
621620

622621
# Get flows path from env config

0 commit comments

Comments
 (0)