Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class StatsDProtocol(asyncio.DatagramProtocol):
- def __init__(self, data: bytes) -> None:
- self.data = data
- - def connection_made(
- - self, transport: asyncio.selector_events.BaseSelectorEventLoop
- - ) -> None:
- - transport.sendto(self.data)
- + def connection_made(self, transport: asyncio.transports.BaseTransport) -> None:
- + # supertype defines the argument type as "BaseTransport"
- + # BaseTransport has no sendto()
- + transport.sendto(self.data) # type: ignore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement