Remove `pragma: no cover` when not raising (#86706)

pull/86725/head
epenet 2023-01-26 16:34:05 +01:00 committed by GitHub
parent 468457eff4
commit 25c451832b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -85,7 +85,7 @@ def _dispatch_bleak_callback(
"""Dispatch the callback."""
if not callback:
# Callback destroyed right before being called, ignore
return # pragma: no cover
return
if (uuids := filters.get(FILTER_UUIDS)) and not uuids.intersection(
advertisement_data.service_uuids

View File

@ -60,7 +60,7 @@ class BroadlinkDevice:
@property
def available(self):
"""Return True if the device is available."""
if self.update_manager is None: # pragma: no cover
if self.update_manager is None:
return False
return self.update_manager.available

View File

@ -99,6 +99,6 @@ class DelugeFlowHandler(ConfigFlow, domain=DOMAIN):
return "cannot_connect"
except Exception as ex: # pylint:disable=broad-except
if type(ex).__name__ == "BadLoginError":
return "invalid_auth" # pragma: no cover
return "invalid_auth"
return "unknown"
return None

View File

@ -118,7 +118,7 @@ class LitterRobotCleaner(LitterRobotEntity[LitterRobot], StateVacuumEntity):
if time_str is None:
return None
if (parsed_time := dt_util.parse_time(time_str)) is None: # pragma: no cover
if (parsed_time := dt_util.parse_time(time_str)) is None:
return None
return (