treewide: reformat
This commit is contained in:
@@ -41,7 +41,7 @@ class ApiBridge(Protocol):
|
||||
|
||||
def process_request(self, request: BackendRequest) -> None:
|
||||
"""Process an API request through the middleware chain."""
|
||||
from clan_app.middleware.base import MiddlewareContext # noqa: PLC0415
|
||||
from clan_app.middleware.base import MiddlewareContext
|
||||
|
||||
with ExitStack() as stack:
|
||||
# Capture the current call stack up to this point
|
||||
@@ -62,7 +62,7 @@ class ApiBridge(Protocol):
|
||||
)
|
||||
middleware.process(context)
|
||||
except Exception as e:
|
||||
from clan_app.middleware.base import ( # noqa: PLC0415
|
||||
from clan_app.middleware.base import (
|
||||
MiddlewareError,
|
||||
)
|
||||
|
||||
|
||||
@@ -191,13 +191,13 @@ class HttpBridge(ApiBridge, BaseHTTPRequestHandler):
|
||||
|
||||
return file_data
|
||||
|
||||
def do_OPTIONS(self) -> None:
|
||||
def do_OPTIONS(self) -> None: # noqa: N802
|
||||
"""Handle CORS preflight requests."""
|
||||
self.send_response_only(200)
|
||||
self._send_cors_headers()
|
||||
self.end_headers()
|
||||
|
||||
def do_GET(self) -> None:
|
||||
def do_GET(self) -> None: # noqa: N802
|
||||
"""Handle GET requests."""
|
||||
parsed_url = urlparse(self.path)
|
||||
path = parsed_url.path
|
||||
@@ -211,7 +211,7 @@ class HttpBridge(ApiBridge, BaseHTTPRequestHandler):
|
||||
else:
|
||||
self.send_api_error_response("info", "Not Found", ["http_bridge", "GET"])
|
||||
|
||||
def do_POST(self) -> None:
|
||||
def do_POST(self) -> None: # noqa: N802
|
||||
"""Handle POST requests."""
|
||||
parsed_url = urlparse(self.path)
|
||||
path = parsed_url.path
|
||||
|
||||
@@ -34,7 +34,7 @@ class WebviewBridge(ApiBridge):
|
||||
|
||||
log.debug(f"Sending response: {serialized}")
|
||||
# Import FuncStatus locally to avoid circular import
|
||||
from .webview import FuncStatus # noqa: PLC0415
|
||||
from .webview import FuncStatus
|
||||
|
||||
self.webview.return_(response._op_key, FuncStatus.SUCCESS, serialized) # noqa: SLF001
|
||||
|
||||
|
||||
Reference in New Issue
Block a user