We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f2f4e2 commit 9e1411fCopy full SHA for 9e1411f
1 file changed
zeroconf/_core.py
@@ -190,7 +190,7 @@ class AsyncListener(asyncio.Protocol, QuietLogger):
190
191
def __init__(self, zc: 'Zeroconf') -> None:
192
self.zc = zc
193
- self.data = None # type: Optional[bytes]
+ self.data: Optional[bytes] = None
194
self.transport: Optional[asyncio.DatagramTransport] = None
195
super().__init__()
196
@@ -199,8 +199,10 @@ def datagram_received(
199
) -> None:
200
assert self.transport is not None
201
if len(addrs) == 2:
202
+ # https://github.com/python/mypy/issues/1178
203
addr, port = addrs # type: ignore
204
elif len(addrs) == 4:
205
206
addr, port, _flow, _scope = addrs # type: ignore
207
else:
208
return
0 commit comments