| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -258,8 +258,6 @@ def async_entries_with_server(self, name: str) -> list[DNSRecord]: | |||
| 258 | 258 | # inefficient. | |
| 259 | 259 | ||
| 260 | 260 | def get(self, entry: DNSEntry) -> DNSRecord | None: | |
| 261 | - """Gets an entry by key. Will return None if there is no | ||
| 262 | - matching entry.""" | ||
| 263 | 261 | if isinstance(entry, _UNIQUE_RECORD_TYPES): | |
| 264 | 262 | return self.cache.get(entry.key, {}).get(entry) | |
| 265 | 263 | 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]: | |||
| 303 | 301 | return [] | |
| 304 | 302 | ||
| 305 | 303 | def entries_with_name(self, name: str) -> list[DNSRecord]: | |
| 306 | - """Returns a list of entries whose key matches the name.""" | ||
| 307 | 304 | if entries := self.cache.get(name.lower()): | |
| 308 | 305 | return list(entries.values()) | |
| 309 | 306 | return [] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -150,10 +150,7 @@ def async_send_with_transport( | |||
| 150 | 150 | ||
| 151 | 151 | ||
| 152 | 152 | class Zeroconf(QuietLogger): | |
| 153 | - """Implementation of Zeroconf Multicast DNS Service Discovery | ||
| 154 | 153 | ||
| 155 | - Supports registration, unregistration, queries and browsing. | ||
| 156 | - """ | ||
| 157 | 154 | ||
| 158 | 155 | def __init__( | |
| 159 | 156 | self, | |
@@ -163,7 +160,6 @@ def __init__( | |||
| 163 | 160 | apple_p2p: bool = False, | |
| 164 | 161 | use_asyncio: bool | None = None, | |
| 165 | 162 | ) -> None: | |
| 166 | - """Creates an instance of the Zeroconf class, establishing | ||
| 167 | 163 | multicast communications, listening and reaping threads. | |
| 168 | 164 | ||
| 169 | 165 | :param interfaces: :class:`InterfaceChoice` or a list of IP addresses | |
@@ -321,20 +317,17 @@ def get_service_info( | |||
| 321 | 317 | return None | |
| 322 | 318 | ||
| 323 | 319 | def add_service_listener(self, type_: str, listener: ServiceListener) -> None: | |
| 324 | - """Adds a listener for a particular service type. This object | ||
| 325 | 320 | will then have its add_service and remove_service methods called when | |
| 326 | 321 | services of that type become available and unavailable.""" | |
| 327 | 322 | self.remove_service_listener(listener) | |
| 328 | 323 | self.browsers[listener] = ServiceBrowser(self, type_, listener) | |
| 329 | 324 | ||
| 330 | 325 | def remove_service_listener(self, listener: ServiceListener) -> None: | |
| 331 | - """Removes a listener from the set that is currently listening.""" | ||
| 332 | 326 | if listener in self.browsers: | |
| 333 | 327 | self.browsers[listener].cancel() | |
| 334 | 328 | del self.browsers[listener] | |
| 335 | 329 | ||
| 336 | 330 | def remove_all_service_listeners(self) -> None: | |
| 337 | - """Removes a listener from the set that is currently listening.""" | ||
| 338 | 331 | for listener in list(self.browsers): | |
| 339 | 332 | self.remove_service_listener(listener) | |
| 340 | 333 | ||
@@ -654,8 +647,6 @@ async def async_check_service( | |||
| 654 | 647 | cooperating_responders: bool = False, | |
| 655 | 648 | strict: bool = True, | |
| 656 | 649 | ) -> None: | |
| 657 | - """Checks the network for a unique service name, modifying the | ||
| 658 | - ServiceInfo passed in if it is not unique.""" | ||
| 659 | 650 | instance_name = instance_name_from_service_info(info, strict=strict) | |
| 660 | 651 | if cooperating_responders: | |
| 661 | 652 | return | |
@@ -694,7 +685,6 @@ def add_listener( | |||
| 694 | 685 | listener: RecordUpdateListener, | |
| 695 | 686 | question: DNSQuestion | list[DNSQuestion] | None, | |
| 696 | 687 | ) -> None: | |
| 697 | - """Adds a listener for a given question. The listener will have | ||
| 698 | 688 | its update_record method called when information is available to | |
| 699 | 689 | answer the question(s). | |
| 700 | 690 | ||
@@ -716,7 +706,6 @@ def async_add_listener( | |||
| 716 | 706 | listener: RecordUpdateListener, | |
| 717 | 707 | question: DNSQuestion | list[DNSQuestion] | None, | |
| 718 | 708 | ) -> None: | |
| 719 | - """Adds a listener for a given question. The listener will have | ||
| 720 | 709 | its update_record method called when information is available to | |
| 721 | 710 | answer the question(s). | |
| 722 | 711 | ||
@@ -808,7 +797,6 @@ def _shutdown_threads(self) -> None: | |||
| 808 | 797 | self.loop.close() | |
| 809 | 798 | ||
| 810 | 799 | def close(self) -> None: | |
| 811 | - """Ends the background threads, and prevent this instance from | ||
| 812 | 800 | servicing further queries. | |
| 813 | 801 | ||
| 814 | 802 | This method is idempotent and irreversible. | |
@@ -826,7 +814,6 @@ def close(self) -> None: | |||
| 826 | 814 | self._shutdown_threads() | |
| 827 | 815 | ||
| 828 | 816 | async def _async_close(self) -> None: | |
| 829 | - """Ends the background threads, and prevent this instance from | ||
| 830 | 817 | servicing further queries. | |
| 831 | 818 | ||
| 832 | 819 | This method is idempotent and irreversible. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments