fixed pyservectl linter errors and formatting
This commit is contained in:
@@ -4,6 +4,7 @@ pyserve scale - Scale services
|
||||
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import click
|
||||
|
||||
@@ -23,7 +24,7 @@ import click
|
||||
help="Don't wait for services to be ready",
|
||||
)
|
||||
@click.pass_obj
|
||||
def scale_cmd(ctx, scales: tuple, timeout: int, no_wait: bool):
|
||||
def scale_cmd(ctx: Any, scales: tuple[str, ...], timeout: int, no_wait: bool) -> None:
|
||||
"""
|
||||
Scale services to specified number of workers.
|
||||
|
||||
@@ -66,7 +67,7 @@ def scale_cmd(ctx, scales: tuple, timeout: int, no_wait: bool):
|
||||
|
||||
console.print("[bold]Scaling services...[/bold]")
|
||||
|
||||
async def do_scale():
|
||||
async def do_scale() -> None:
|
||||
for service, workers in scale_map.items():
|
||||
current = all_services[service].workers or 1
|
||||
print_info(f"Scaling {service}: {current} → {workers} workers")
|
||||
|
||||
Reference in New Issue
Block a user