Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/zeroconf/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def get(self, entry: DNSEntry) -> DNSRecord | None:
return None

def get_all_by_details(self, name: str, type_: _int, class_: _int) -> list[DNSRecord]:
"""Gets all matching entries by details."""
"""Return every cached record carrying this name, type and class."""
key = name.lower()
records = self.cache.get(key)
if records is None:
Expand Down
8 changes: 0 additions & 8 deletions src/zeroconf/_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def __init__(self, name: str, type_: int, class_: int) -> None:
self._fast_init_entry(name, type_, class_)

def __eq__(self, other: Any) -> bool:
"""Equal when key, type and class match."""
return isinstance(other, DNSEntry) and self._dns_entry_matches(other)

@property
Expand Down Expand Up @@ -133,7 +132,6 @@ def __init__(self, name: str, type_: int, class_: int) -> None:
self._fast_init(name, type_, class_)

def __eq__(self, other: Any) -> bool:
"""Equal when the entry fields match a question."""
return isinstance(other, DNSQuestion) and self._dns_entry_matches(other)

def __hash__(self) -> int:
Expand Down Expand Up @@ -271,7 +269,6 @@ def __init__(
self._fast_init(name, type_, class_, ttl, address, scope_id, created or current_time_millis())

def __eq__(self, other: Any) -> bool:
"""Equal when address and the entry fields match."""
return isinstance(other, DNSAddress) and self._eq(other)

def __hash__(self) -> int:
Expand Down Expand Up @@ -333,7 +330,6 @@ def __init__(
self._fast_init(name, type_, class_, ttl, cpu, os, created or current_time_millis())

def __eq__(self, other: Any) -> bool:
"""Equal when cpu, os and the entry fields match."""
return isinstance(other, DNSHinfo) and self._eq(other)

def __hash__(self) -> int:
Expand Down Expand Up @@ -378,7 +374,6 @@ def __init__(
self._fast_init(name, type_, class_, ttl, next_name, rdtypes, created or current_time_millis())

def __eq__(self, other: Any) -> bool:
"""Equal when next_name, rdtypes and the entry fields match."""
return isinstance(other, DNSNsec) and self._eq(other)

def __hash__(self) -> int:
Expand Down Expand Up @@ -448,7 +443,6 @@ def __init__(
self._fast_init(name, type_, class_, ttl, alias, created or current_time_millis())

def __eq__(self, other: Any) -> bool:
"""Equal when alias and the entry fields match."""
return isinstance(other, DNSPointer) and self._eq(other)

def __hash__(self) -> int:
Expand Down Expand Up @@ -505,7 +499,6 @@ def __init__(
)

def __eq__(self, other: Any) -> bool:
"""Equal when priority, weight, port, server and the entry fields match."""
return isinstance(other, DNSService) and self._eq(other)

def __hash__(self) -> int:
Expand Down Expand Up @@ -568,7 +561,6 @@ def __init__(
self._fast_init(name, type_, class_, ttl, text, created or current_time_millis())

def __eq__(self, other: Any) -> bool:
"""Equal when text and the entry fields match."""
return isinstance(other, DNSText) and self._eq(other)

def __hash__(self) -> int:
Expand Down
Loading