FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: drop the equality docstring family and reword the cache lookup… · python-zeroconf/python-zeroconf@d5f4102 · GitHub

Repository navigation

Commit d5f4102

Browse files
authored
chore: drop the equality docstring family and reword the cache lookup docstring (#1892)
1 parent 25f564a commit d5f4102

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

‎src/zeroconf/_cache.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def get(self, entry: DNSEntry) -> DNSRecord | None:
198198
return None
199199

200200
def get_all_by_details(self, name: str, type_: _int, class_: _int) -> list[DNSRecord]:
201-
"""Gets all matching entries by details."""
201+
"""Return every cached record carrying this name, type and class."""
202202
key = name.lower()
203203
records = self.cache.get(key)
204204
if records is None:

‎src/zeroconf/_dns.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def __init__(self, name: str, type_: int, class_: int) -> None:
7676
self._fast_init_entry(name, type_, class_)
7777

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

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

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

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

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

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

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

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

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

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

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

454448
def __hash__(self) -> int:
@@ -505,7 +499,6 @@ def __init__(
505499
)
506500

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

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

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

574566
def __hash__(self) -> int:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL