Skip to content

Commit

Permalink
Fix restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa committed Feb 1, 2024
1 parent ca82c38 commit 7ad568b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/python_testing/mdns_discovery/mdns_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self):

async def get_commissioner_service(self, log_output: bool = False,
discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC
) -> MdnsServiceInfo:
) -> Optional[MdnsServiceInfo]:
"""
Asynchronously discovers a commissioner mDNS service within the network.
Expand All @@ -119,7 +119,7 @@ async def get_commissioner_service(self, log_output: bool = False,

async def get_commissionable_service(self, log_output: bool = False,
discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC
) -> MdnsServiceInfo:
) -> Optional[MdnsServiceInfo]:
"""
Asynchronously discovers a commissionable mDNS service within the network.
Expand Down Expand Up @@ -175,7 +175,7 @@ async def get_operational_service(self, service_name: str = None,

async def get_border_router_service(self, log_output: bool = False,
discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC
) -> MdnsServiceInfo:
) -> Optional[MdnsServiceInfo]:
"""
Asynchronously discovers a border router mDNS service within the network.
Expand All @@ -201,7 +201,7 @@ async def get_all_services(self, log_output: bool = False,
Returns:
Dict[str, List[MdnsServiceInfo]]: A dictionary mapping service types (str) to
lists of MdnsServiceInfo objects.
"""
"""
return await self._discover(all_services=True,
discovery_timeout_sec=discovery_timeout_sec,
log_output=log_output)
Expand All @@ -213,15 +213,15 @@ async def _discover(self,
log_output: bool = False) -> None:
"""
Asynchronously discovers network services using multicast DNS (mDNS).
Args:
discovery_timeout_sec (float): The duration in seconds to wait for the discovery process, allowing for service
announcements to be collected. Defaults to a specified duration if not provided.
all_services (bool): If True, discovers all available mDNS services. If False, discovers services based on the
predefined `_service_types` list. Defaults to False.
log_output (bool): If True, logs the discovered services to the console in JSON format for debugging or informational
purposes. Defaults to False.
Returns:
None: This method does not return any value.
Expand Down Expand Up @@ -339,7 +339,7 @@ def _to_mdns_service_info_class(self, service_info: AsyncServiceInfo) -> MdnsSer
async def _get_service(self, service_type: MdnsServiceType,
log_output: bool = False,
discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC
) -> MdnsServiceInfo:
) -> Optional[MdnsServiceInfo]:
"""
Asynchronously discovers a specific type of mDNS service within the network and returns its details.
Expand Down

0 comments on commit 7ad568b

Please sign in to comment.