Ruff: Add and fix UP rules

This commit is contained in:
Josh Wu
2026-01-01 03:07:06 +08:00
parent 8e28f4e159
commit 3f643de4c1
102 changed files with 922 additions and 999 deletions

View File

@@ -16,7 +16,6 @@
# Imports
# -----------------------------------------------------------------------------
import logging
from typing import Optional
import websockets.asyncio.server
@@ -43,8 +42,8 @@ async def open_ws_server_transport(spec: str) -> Transport:
class WsServerTransport(Transport):
sink: PumpedPacketSink
source: ParserSource
connection: Optional[websockets.asyncio.server.ServerConnection]
server: Optional[websockets.asyncio.server.Server]
connection: websockets.asyncio.server.ServerConnection | None
server: websockets.asyncio.server.Server | None
def __init__(self) -> None:
source = ParserSource()