diff --git a/pythonosc/dispatcher.py b/pythonosc/dispatcher.py index 680f26d..0ea9480 100644 --- a/pythonosc/dispatcher.py +++ b/pythonosc/dispatcher.py @@ -1,5 +1,4 @@ -"""Maps OSC addresses to handler functions -""" +"""Maps OSC addresses to handler functions""" import collections import inspect diff --git a/pythonosc/osc_bundle_builder.py b/pythonosc/osc_bundle_builder.py index ee28d6f..7b9bf20 100644 --- a/pythonosc/osc_bundle_builder.py +++ b/pythonosc/osc_bundle_builder.py @@ -25,9 +25,11 @@ def __init__(self, timestamp: int) -> None: seconds since the epoch in UTC or IMMEDIATELY. """ self._timestamp = timestamp - self._contents: List[osc_bundle.OscBundle] = [] + self._contents: List[osc_bundle.OscBundle | osc_message.OscMessage] = [] - def add_content(self, content: osc_bundle.OscBundle) -> None: + def add_content( + self, content: osc_bundle.OscBundle | osc_message.OscMessage + ) -> None: """Add a new content to this bundle. Args: diff --git a/pythonosc/osc_message_builder.py b/pythonosc/osc_message_builder.py index ebbc2cb..c17da45 100644 --- a/pythonosc/osc_message_builder.py +++ b/pythonosc/osc_message_builder.py @@ -96,7 +96,7 @@ def add_arg(self, arg_value: ArgValue, arg_type: Optional[str] = None) -> None: arg_type = self._get_arg_type(arg_value) if isinstance(arg_type, list): self._args.append((self.ARG_TYPE_ARRAY_START, None)) - for v, t in zip(arg_value, arg_type): # type: ignore[var-annotated, arg-type] + for v, t in zip(arg_value, arg_type): # type: ignore[arg-type] self.add_arg(v, t) self._args.append((self.ARG_TYPE_ARRAY_STOP, None)) else: diff --git a/pythonosc/osc_server.py b/pythonosc/osc_server.py index b2fd5a9..aad0162 100644 --- a/pythonosc/osc_server.py +++ b/pythonosc/osc_server.py @@ -1,5 +1,4 @@ -"""OSC Servers that receive UDP packets and invoke handlers accordingly. -""" +"""OSC Servers that receive UDP packets and invoke handlers accordingly.""" import asyncio import os diff --git a/pythonosc/test/parsing/test_osc_types.py b/pythonosc/test/parsing/test_osc_types.py index 052a161..55e70b3 100644 --- a/pythonosc/test/parsing/test_osc_types.py +++ b/pythonosc/test/parsing/test_osc_types.py @@ -85,10 +85,10 @@ def test_get_rgba(self): b"\x00\x00\x00\x01": (1, 4), b"\x00\x00\x00\x02": (2, 4), b"\x00\x00\x00\x03": (3, 4), - b"\xFF\x00\x00\x00": (4278190080, 4), - b"\x00\xFF\x00\x00": (16711680, 4), - b"\x00\x00\xFF\x00": (65280, 4), - b"\x00\x00\x00\xFF": (255, 4), + b"\xff\x00\x00\x00": (4278190080, 4), + b"\x00\xff\x00\x00": (16711680, 4), + b"\x00\x00\xff\x00": (65280, 4), + b"\x00\x00\x00\xff": (255, 4), b"\x00\x00\x00\x01GARBAGE": (1, 4), } @@ -164,7 +164,7 @@ def test_get_timetag(self): (datetime(1900, 1, 1, 0, 0, 0), 0), 8, ), - b"\x83\xaa\x7E\x80\x0A\x00\xB0\x0C": ( + b"\x83\xaa\x7e\x80\x0a\x00\xb0\x0c": ( (datetime(1970, 1, 1, 0, 0, 0), 167817228), 8, ),