mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-11-21 19:28:35 +00:00
Make type annotations safe for Python 3.7.
This commit is contained in:
parent
da95efa544
commit
51e1f2ccae
2 changed files with 3 additions and 3 deletions
|
@ -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]]]
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue