Fix pylint erros for sharkiq (#39428)
This commit is contained in:
parent
4a21b1f589
commit
70c241b51b
2 changed files with 6 additions and 6 deletions
homeassistant/components/sharkiq
|
@ -30,10 +30,10 @@ async def validate_input(hass: core.HomeAssistant, data):
|
||||||
with async_timeout.timeout(10):
|
with async_timeout.timeout(10):
|
||||||
LOGGER.debug("Initialize connection to Ayla networks API")
|
LOGGER.debug("Initialize connection to Ayla networks API")
|
||||||
await ayla_api.async_sign_in()
|
await ayla_api.async_sign_in()
|
||||||
except (asyncio.TimeoutError, aiohttp.ClientError):
|
except (asyncio.TimeoutError, aiohttp.ClientError) as errors:
|
||||||
raise CannotConnect
|
raise CannotConnect from errors
|
||||||
except SharkIqAuthError:
|
except SharkIqAuthError as error:
|
||||||
raise InvalidAuth
|
raise InvalidAuth from error
|
||||||
|
|
||||||
# Return info that you want to store in the config entry.
|
# Return info that you want to store in the config entry.
|
||||||
return {"title": data[CONF_USERNAME]}
|
return {"title": data[CONF_USERNAME]}
|
||||||
|
|
|
@ -94,9 +94,9 @@ class SharkIqUpdateCoordinator(DataUpdateCoordinator):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
raise UpdateFailed(err)
|
raise UpdateFailed(err) from err
|
||||||
except Exception as err: # pylint: disable=broad-except
|
except Exception as err: # pylint: disable=broad-except
|
||||||
LOGGER.exception("Unexpected error updating SharkIQ", exc_info=err)
|
LOGGER.exception("Unexpected error updating SharkIQ", exc_info=err)
|
||||||
raise UpdateFailed(err)
|
raise UpdateFailed(err) from err
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Reference in a new issue