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

@@ -17,7 +17,6 @@
# -----------------------------------------------------------------------------
import asyncio
import logging
from typing import Optional
import serial_asyncio
@@ -52,7 +51,7 @@ class SerialPacketSource(StreamPacketSource):
logger.debug('connection made')
self._ready.set()
def connection_lost(self, exc: Optional[Exception]) -> None:
def connection_lost(self, exc: Exception | None) -> None:
logger.debug('connection lost')
self.on_transport_lost()