Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pythonosc/dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Maps OSC addresses to handler functions
"""
"""Maps OSC addresses to handler functions"""

import collections
import inspect
Expand Down
6 changes: 4 additions & 2 deletions pythonosc/osc_bundle_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pythonosc/osc_message_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions pythonosc/osc_server.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions pythonosc/test/parsing/test_osc_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}

Expand Down Expand Up @@ -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,
),
Expand Down