fixed pyservectl linter errors and formatting

This commit is contained in:
Илья Глазунов
2025-12-04 03:17:21 +03:00
parent 7662a7924a
commit 3b59994fc9
15 changed files with 87 additions and 62 deletions
+6 -6
View File
@@ -5,7 +5,7 @@ pyserve top - Live monitoring dashboard
import asyncio
import time
from pathlib import Path
from typing import Optional
from typing import Any, Optional
import click
@@ -25,7 +25,7 @@ import click
help="Disable colored output",
)
@click.pass_obj
def top_cmd(ctx, services: tuple, refresh_interval: float, no_color: bool):
def top_cmd(ctx: Any, services: tuple[str, ...], refresh_interval: float, no_color: bool) -> None:
"""
Live monitoring dashboard for services.
@@ -60,11 +60,11 @@ def top_cmd(ctx, services: tuple, refresh_interval: float, no_color: bool):
async def _run_dashboard(
state_manager,
filter_services: Optional[list],
state_manager: Any,
filter_services: Optional[list[str]],
refresh_interval: float,
no_color: bool,
):
) -> None:
from rich.layout import Layout
from rich.live import Live
from rich.panel import Panel
@@ -81,7 +81,7 @@ async def _run_dashboard(
start_time = time.time()
def make_dashboard():
def make_dashboard() -> Any:
all_services = state_manager.get_all_services()
if filter_services: