Merge pull request 'Misc ruff fixes' (#4965) from ruff-foo into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4965
This commit is contained in:
Mic92
2025-08-26 09:44:06 +00:00
40 changed files with 243 additions and 149 deletions

View File

@@ -5,7 +5,7 @@ from contextlib import ExitStack
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, Any
from clan_lib.api import ApiResponse
from clan_lib.api import ApiError, ApiResponse, ErrorDataClass
from clan_lib.api.tasks import WebThread
from clan_lib.async_run import set_current_thread_opkey, set_should_cancel
@@ -75,8 +75,6 @@ class ApiBridge(ABC):
location: list[str],
) -> None:
"""Send an error response."""
from clan_lib.api import ApiError, ErrorDataClass
error_data = ErrorDataClass(
op_key=op_key,
status="error",

View File

@@ -1,5 +1,6 @@
import logging
import os
import time
from dataclasses import dataclass
from pathlib import Path
@@ -95,8 +96,6 @@ def app_run(app_opts: ClanAppOptions) -> int:
log.info("Press Ctrl+C to stop the server")
try:
# Keep the main thread alive
import time
while True:
time.sleep(1)
except KeyboardInterrupt: