Skip to content

Commit

Permalink
make the latest pyright happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rthalley committed Jan 29, 2025
1 parent d088220 commit b2f09a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dns/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,7 @@ def _getnameinfo(sockaddr, flags=0):
pname = "udp"
else:
pname = "tcp"
assert isinstance(addr, str)
qname = dns.reversename.from_address(addr)
if flags & socket.NI_NUMERICHOST == 0:
try:
Expand Down Expand Up @@ -2014,6 +2015,7 @@ def _gethostbyaddr(ip):
bin_ip = dns.inet.inet_pton(family, ip)
for item in tuples:
addr = item[4][0]
assert isinstance(addr, str)
bin_addr = dns.inet.inet_pton(family, addr)
if bin_ip == bin_addr:
addresses.append(addr)
Expand Down

0 comments on commit b2f09a9

Please sign in to comment.