Skip to content

Commit ed9344e

Browse files
committed
Revert "make rdtypes a set"
This reverts commit 5d4f07d.
1 parent 5d4f07d commit ed9344e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

zeroconf/_dns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import enum
2424
import socket
25-
from typing import Any, Dict, Iterable, Optional, TYPE_CHECKING, Set, Tuple, Union, cast
25+
from typing import Any, Dict, Iterable, List, Optional, TYPE_CHECKING, Tuple, Union, cast
2626

2727
from ._exceptions import AbstractMethodException
2828
from ._utils.net import _is_v6_address
@@ -455,7 +455,7 @@ def __init__(
455455
class_: int,
456456
ttl: int,
457457
next: str,
458-
rdtypes: Set[int],
458+
rdtypes: List[int],
459459
created: Optional[float] = None,
460460
) -> None:
461461
super().__init__(name, type_, class_, ttl, created)

zeroconf/_protocol.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import enum
2424
import struct
25-
from typing import Any, Dict, List, Optional, Set, TYPE_CHECKING, Tuple, Union, cast
25+
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Tuple, Union, cast
2626

2727

2828
from ._dns import DNSAddress, DNSHinfo, DNSNsec, DNSPointer, DNSQuestion, DNSRecord, DNSService, DNSText
@@ -223,9 +223,9 @@ def read_others(self) -> None:
223223
if rec is not None:
224224
self.answers.append(rec)
225225

226-
def read_bitmap(self, end: int) -> Set[int]:
226+
def read_bitmap(self, end: int) -> List[int]:
227227
"""Reads an NSEC bitmap from the packet."""
228-
rdtypes = set()
228+
rdtypes = []
229229
while self.offset < end:
230230
window = self.data[self.offset]
231231
self.offset += 1
@@ -235,7 +235,7 @@ def read_bitmap(self, end: int) -> Set[int]:
235235
for i, byte in enumerate(bitmap):
236236
for bit in range(0, 8):
237237
if byte & (0x80 >> bit):
238-
rdtypes.add(bit + window * 256 + i * 8)
238+
rdtypes.append(bit + window * 256 + i * 8)
239239
self.offset += bitmap_length
240240
return rdtypes
241241

0 commit comments

Comments
 (0)