Skip to content

Commit 31ffee8

Browse files
.
1 parent 8074f5b commit 31ffee8

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

src/pyartnet/base/base_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
from asyncio import sleep
4-
from socket import socket
54
from time import monotonic
65
from typing import TYPE_CHECKING, Final, Generic, TypeVar
76

@@ -13,6 +12,7 @@
1312

1413

1514
if TYPE_CHECKING:
15+
from socket import socket
1616
from types import TracebackType
1717

1818
import pyartnet
@@ -78,7 +78,7 @@ def _send_data(self, data: bytearray | bytes, dst: tuple[str, int] | str | None
7878
msg = 'Socket closed! Did you forget to use "async with"?'
7979
raise RuntimeError(msg)
8080

81-
sock.sendto(self._packet_base + data, dst)
81+
sock.sendto(self._packet_base + data, dst) #type: ignore[arg-type]
8282
return None
8383

8484
async def _process_values_task(self) -> None:

src/pyartnet/base/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
from socket import AF_INET, AF_INET6, AF_UNSPEC, SOCK_DGRAM
77
from typing import Final, Literal
88

9-
from typing_extensions import Self, override
9+
from typing_extensions import Self, TypeAlias, override
1010

1111

12-
RESOLVE_TO_IP_TYPE: Final = Literal['auto', 'v4', 'v6']
12+
RESOLVE_TO_IP_TYPE: TypeAlias = Literal['auto', 'v4', 'v6']
1313

1414

1515
def validate_port(port: int, *, allow_0: bool = False) -> int:

src/pyartnet/impl_artnet/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ArtNetNode(BaseNode['pyartnet.impl_artnet.ArtNetUniverse']):
2626
def __init__(self, network: UnicastNetworkTarget, *,
2727
name: str | None = None,
2828
max_fps: int = 25,
29-
refresh_every: float = 2, start_refresh_task: bool = True,
29+
refresh_every: float = 2,
3030

3131
# ArtNet specific fields
3232
sequence_counter: bool = True

src/pyartnet/impl_kinet/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class KiNetNode(BaseNode['pyartnet.impl_kinet.KiNetUniverse']):
2626
def __init__(self, network: UnicastNetworkTarget, *,
2727
name: str | None = None,
2828
max_fps: int = 25,
29-
refresh_every: float = 2, start_refresh_task: bool = True) -> None:
29+
refresh_every: float = 2) -> None:
3030
super().__init__(network, name=name, max_fps=max_fps, refresh_every=refresh_every)
3131

3232
self._dst: Final = network.dst

src/pyartnet/impl_sacn/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class SacnNode(BaseNode['pyartnet.impl_sacn.SacnUniverse']):
4141
def __init__(self, network: UnicastNetworkTarget | MulticastNetworkTarget, *,
4242
name: str | None = None,
4343
max_fps: int = 25,
44-
refresh_every: float = 2, start_refresh_task: bool = True,
44+
refresh_every: float = 2,
4545

4646
# sACN E1.31 specific fields
4747
cid: bytes | None = None, source_name: str | None = None

tests/test_impl/test_sacn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ async def test_sacn() -> None:
1414
UnicastNetworkTestingTarget(('ip', 9999999)),
1515
cid=b'\x41\x68\xf5\x2b\x1a\x7b\x2d\xe1\x17\x12\xe9\xee\x38\x3d\x22\x58',
1616
source_name='default source name',
17-
start_refresh_task=True
1817
)
1918
async with sacn:
2019

@@ -48,7 +47,6 @@ async def test_sacn_with_sync(caplog, multicast) -> None:
4847
network,
4948
cid=b'\x41\x68\xf5\x2b\x1a\x7b\x2d\xe1\x17\x12\xe9\xee\x38\x3d\x22\x58',
5049
source_name='default source name',
51-
start_refresh_task=False,
5250
name='device1'
5351
)
5452
async with sacn:

0 commit comments

Comments
 (0)