PLC0415: fix

This commit is contained in:
Jörg Thalheim
2025-08-20 20:16:19 +02:00
parent 648aa7dc59
commit 31cbb7dc00
9 changed files with 17 additions and 42 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
@@ -43,8 +43,6 @@ class ApiBridge(ABC):
def process_request(self, request: BackendRequest) -> None:
"""Process an API request through the middleware chain."""
from .middleware import MiddlewareContext
with ExitStack() as stack:
context = MiddlewareContext(
request=request,
@@ -75,8 +73,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: