ruff: enable UP

This commit is contained in:
Adeeb Shihadeh
2024-05-20 17:43:54 -07:00
parent 788c4edeec
commit b2e4c64cf8
25 changed files with 42 additions and 41 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ class MockResponse:
self.status_code = status_code
class EchoSocket():
class EchoSocket:
def __init__(self, port):
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket.bind(('127.0.0.1', port))
@@ -34,7 +34,7 @@ class EchoSocket():
self.socket.close()
class MockApi():
class MockApi:
def __init__(self, dongle_id):
pass
@@ -42,7 +42,7 @@ class MockApi():
return "fake-token"
class MockWebsocket():
class MockWebsocket:
sock = socket.socket()
def __init__(self, recv_queue, send_queue):
+3 -3
View File
@@ -28,12 +28,12 @@ def create_random_file(file_path: Path, size_mb: float, lock: bool = False, uplo
if upload_xattr is not None:
setxattr(str(file_path), uploader.UPLOAD_ATTR_NAME, upload_xattr)
class MockResponse():
class MockResponse:
def __init__(self, text, status_code):
self.text = text
self.status_code = status_code
class MockApi():
class MockApi:
def __init__(self, dongle_id):
pass
@@ -43,7 +43,7 @@ class MockApi():
def get_token(self):
return "fake-token"
class MockApiIgnore():
class MockApiIgnore:
def __init__(self, dongle_id):
pass
+1 -1
View File
@@ -61,7 +61,7 @@ def get_assistnow_messages(token: bytes) -> list[bytes]:
return msgs
class TTYPigeon():
class TTYPigeon:
def __init__(self):
self.tty = serial.VTIMESerial(UBLOX_TTY, baudrate=9600, timeout=0)
+2 -1
View File
@@ -1,6 +1,7 @@
import pathlib
import tarfile
from typing import IO, Callable
from typing import IO
from collections.abc import Callable
def include_default(_) -> bool:
+1 -1
View File
@@ -27,7 +27,7 @@ def get_version(path: str = BASEDIR) -> str:
def get_release_notes(path: str = BASEDIR) -> str:
with open(os.path.join(path, "RELEASES.md"), "r") as f:
with open(os.path.join(path, "RELEASES.md")) as f:
return f.read().split('\n\n', 1)[0]
+1 -1
View File
@@ -20,7 +20,7 @@ from parameterized import parameterized_class
([], []),
])
@pytest.mark.asyncio
class TestWebrtcdProc():
class TestWebrtcdProc:
async def assertCompletesWithTimeout(self, awaitable, timeout=1):
try:
async with asyncio.timeout(timeout):