diff --git a/sprockets_statsd/statsd.py b/sprockets_statsd/statsd.py index 43cd329..b35e605 100644 --- a/sprockets_statsd/statsd.py +++ b/sprockets_statsd/statsd.py @@ -333,7 +333,7 @@ class Processor: logger: logging.Logger protocol: typing.Optional[StatsdProtocol] - queue: asyncio.Queue[bytes] + queue: asyncio.Queue _create_transport: typing.Callable[[], typing.Coroutine[ typing.Any, typing.Any, typing.Tuple[asyncio.BaseTransport, StatsdProtocol]]] diff --git a/tests/helpers.py b/tests/helpers.py index b9bb6da..91a21ef 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -20,7 +20,7 @@ class StatsdServer(asyncio.DatagramProtocol, asyncio.Protocol): self.running = asyncio.Event() self.client_connected = asyncio.Semaphore(value=0) self.message_received = asyncio.Semaphore(value=0) - self.transports: list[asyncio.BaseTransport] = [] + self.transports: typing.List[asyncio.BaseTransport] = [] self._buffer = io.BytesIO() @@ -34,7 +34,7 @@ class StatsdServer(asyncio.DatagramProtocol, asyncio.Protocol): self.port, reuse_port=True) self.server = server - listening_sock = typing.cast(list[socket.socket], + listening_sock = typing.cast(typing.List[socket.socket], server.sockets)[0] self.host, self.port = listening_sock.getsockname() self.running.set()