Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8183640

Browse files
authored
Cleanup typing in zero._core and document ignores (#714)
1 parent 0f2f4e2 commit 8183640

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zeroconf/_core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class AsyncListener(asyncio.Protocol, QuietLogger):
190190

191191
def __init__(self, zc: 'Zeroconf') -> None:
192192
self.zc = zc
193-
self.data = None # type: Optional[bytes]
193+
self.data: Optional[bytes] = None
194194
self.transport: Optional[asyncio.DatagramTransport] = None
195195
super().__init__()
196196

@@ -199,8 +199,10 @@ def datagram_received(
199199
) -> None:
200200
assert self.transport is not None
201201
if len(addrs) == 2:
202+
# https://github.com/python/mypy/issues/1178
202203
addr, port = addrs # type: ignore
203204
elif len(addrs) == 4:
205+
# https://github.com/python/mypy/issues/1178
204206
addr, port, _flow, _scope = addrs # type: ignore
205207
else:
206208
return

0 commit comments

Comments
 (0)