We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 551d5ed + a17159c commit 9f30c74Copy full SHA for 9f30c74
pythonosc/dispatcher.py
@@ -1,5 +1,4 @@
1
-"""Maps OSC addresses to handler functions
2
-"""
+"""Maps OSC addresses to handler functions"""
3
4
import collections
5
import inspect
pythonosc/osc_bundle_builder.py
@@ -25,9 +25,11 @@ def __init__(self, timestamp: int) -> None:
25
seconds since the epoch in UTC or IMMEDIATELY.
26
"""
27
self._timestamp = timestamp
28
- self._contents: List[osc_bundle.OscBundle] = []
+ self._contents: List[osc_bundle.OscBundle | osc_message.OscMessage] = []
29
30
- def add_content(self, content: osc_bundle.OscBundle) -> None:
+ def add_content(
31
+ self, content: osc_bundle.OscBundle | osc_message.OscMessage
32
+ ) -> None:
33
"""Add a new content to this bundle.
34
35
Args:
pythonosc/osc_message_builder.py
@@ -96,7 +96,7 @@ def add_arg(self, arg_value: ArgValue, arg_type: Optional[str] = None) -> None:
96
arg_type = self._get_arg_type(arg_value)
97
if isinstance(arg_type, list):
98
self._args.append((self.ARG_TYPE_ARRAY_START, None))
99
- 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]
100
self.add_arg(v, t)
101
self._args.append((self.ARG_TYPE_ARRAY_STOP, None))
102
else:
pythonosc/osc_server.py
-"""OSC Servers that receive UDP packets and invoke handlers accordingly.
+"""OSC Servers that receive UDP packets and invoke handlers accordingly."""
import asyncio
import os
pythonosc/test/parsing/test_osc_types.py
@@ -85,10 +85,10 @@ def test_get_rgba(self):
85
b"\x00\x00\x00\x01": (1, 4),
86
b"\x00\x00\x00\x02": (2, 4),
87
b"\x00\x00\x00\x03": (3, 4),
88
- b"\xFF\x00\x00\x00": (4278190080, 4),
89
- b"\x00\xFF\x00\x00": (16711680, 4),
90
- b"\x00\x00\xFF\x00": (65280, 4),
91
- 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),
92
b"\x00\x00\x00\x01GARBAGE": (1, 4),
93
}
94
@@ -164,7 +164,7 @@ def test_get_timetag(self):
164
(datetime(1900, 1, 1, 0, 0, 0), 0),
165
8,
166
),
167
- b"\x83\xaa\x7E\x80\x0A\x00\xB0\x0C": (
+ b"\x83\xaa\x7e\x80\x0a\x00\xb0\x0c": (
168
(datetime(1970, 1, 1, 0, 0, 0), 167817228),
169
170
0 commit comments