Skip to content

Commit

Permalink
fix(answer): add typing to range (#1138)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgettica authored Oct 5, 2024
1 parent 566d103 commit 3a0f83f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dns/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import dns.ipv6
import dns.message
import dns.name
import dns.rdata
import dns.nameserver
import dns.query
import dns.rcode
Expand Down Expand Up @@ -297,7 +298,7 @@ def __getattr__(self, attr): # pragma: no cover
def __len__(self) -> int:
return self.rrset and len(self.rrset) or 0

def __iter__(self):
def __iter__(self) -> Iterator[dns.rdata.Rdata]:
return self.rrset and iter(self.rrset) or iter(tuple())

def __getitem__(self, i):
Expand Down

0 comments on commit 3a0f83f

Please sign in to comment.