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

revert: remove non-consented prose and code from the library (#1843) · python-zeroconf/python-zeroconf@746ce55 · GitHub

Repository navigation

Commit 746ce55

Browse files
revert: remove non-consented prose and code from the library (#1843)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 764d6b1 commit 746ce55

15 files changed

Lines changed: 1 addition & 326 deletions

File tree

‎examples/browser.py‎

Lines changed: 0 additions & 89 deletions
This file was deleted.

‎examples/registration.py‎

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎src/zeroconf/_cache.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,6 @@ def async_entries_with_server(self, name: str) -> list[DNSRecord]:
258258
# inefficient.
259259

260260
def get(self, entry: DNSEntry) -> DNSRecord | None:
261-
"""Gets an entry by key. Will return None if there is no
262-
matching entry."""
263261
if isinstance(entry, _UNIQUE_RECORD_TYPES):
264262
return self.cache.get(entry.key, {}).get(entry)
265263
for cached_entry in reversed(list(self.cache.get(entry.key, {}).values())):
@@ -303,7 +301,6 @@ def entries_with_server(self, server: str) -> list[DNSRecord]:
303301
return []
304302

305303
def entries_with_name(self, name: str) -> list[DNSRecord]:
306-
"""Returns a list of entries whose key matches the name."""
307304
if entries := self.cache.get(name.lower()):
308305
return list(entries.values())
309306
return []

‎src/zeroconf/_core.py‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ def async_send_with_transport(
150150

151151

152152
class Zeroconf(QuietLogger):
153-
"""Implementation of Zeroconf Multicast DNS Service Discovery
154153

155-
Supports registration, unregistration, queries and browsing.
156-
"""
157154

158155
def __init__(
159156
self,
@@ -163,7 +160,6 @@ def __init__(
163160
apple_p2p: bool = False,
164161
use_asyncio: bool | None = None,
165162
) -> None:
166-
"""Creates an instance of the Zeroconf class, establishing
167163
multicast communications, listening and reaping threads.
168164

169165
:param interfaces: :class:`InterfaceChoice` or a list of IP addresses
@@ -321,20 +317,17 @@ def get_service_info(
321317
return None
322318
323319
def add_service_listener(self, type_: str, listener: ServiceListener) -> None:
324-
"""Adds a listener for a particular service type. This object
325320
will then have its add_service and remove_service methods called when
326321
services of that type become available and unavailable."""
327322
self.remove_service_listener(listener)
328323
self.browsers[listener] = ServiceBrowser(self, type_, listener)
329324

330325
def remove_service_listener(self, listener: ServiceListener) -> None:
331-
"""Removes a listener from the set that is currently listening."""
332326
if listener in self.browsers:
333327
self.browsers[listener].cancel()
334328
del self.browsers[listener]
335329

336330
def remove_all_service_listeners(self) -> None:
337-
"""Removes a listener from the set that is currently listening."""
338331
for listener in list(self.browsers):
339332
self.remove_service_listener(listener)
340333

@@ -654,8 +647,6 @@ async def async_check_service(
654647
cooperating_responders: bool = False,
655648
strict: bool = True,
656649
) -> None:
657-
"""Checks the network for a unique service name, modifying the
658-
ServiceInfo passed in if it is not unique."""
659650
instance_name = instance_name_from_service_info(info, strict=strict)
660651
if cooperating_responders:
661652
return
@@ -694,7 +685,6 @@ def add_listener(
694685
listener: RecordUpdateListener,
695686
question: DNSQuestion | list[DNSQuestion] | None,
696687
) -> None:
697-
"""Adds a listener for a given question. The listener will have
698688
its update_record method called when information is available to
699689
answer the question(s).
700690

@@ -716,7 +706,6 @@ def async_add_listener(
716706
listener: RecordUpdateListener,
717707
question: DNSQuestion | list[DNSQuestion] | None,
718708
) -> None:
719-
"""Adds a listener for a given question. The listener will have
720709
its update_record method called when information is available to
721710
answer the question(s).
722711
@@ -808,7 +797,6 @@ def _shutdown_threads(self) -> None:
808797
self.loop.close()
809798

810799
def close(self) -> None:
811-
"""Ends the background threads, and prevent this instance from
812800
servicing further queries.
813801

814802
This method is idempotent and irreversible.
@@ -826,7 +814,6 @@ def close(self) -> None:
826814
self._shutdown_threads()
827815
828816
async def _async_close(self) -> None:
829-
"""Ends the background threads, and prevent this instance from
830817
servicing further queries.
831818
832819
This method is idempotent and irreversible.

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL