diff --git a/custom_components/teracom/config_flow.py b/custom_components/teracom/config_flow.py index 31c70ed..1e1c100 100644 --- a/custom_components/teracom/config_flow.py +++ b/custom_components/teracom/config_flow.py @@ -1,4 +1,5 @@ """Config flow for Teracom TCW integration.""" + import logging import voluptuous as vol @@ -148,8 +149,8 @@ async def async_step_user(self, user_input=None): placeholders = {"model": mns.args[0]} except AbortFlow: errors["base"] = "already_configured" - except Exception as ex: # pylint: disable=broad-except - _LOGGER.exception("Unexpected exception: %s", ex) + except Exception: # pylint: disable=broad-except + _LOGGER.exception("Unexpected exception: %s") errors["base"] = "unknown" return self.async_show_form( diff --git a/custom_components/teracom/diagnostics.py b/custom_components/teracom/diagnostics.py index 31feb21..4116bbc 100644 --- a/custom_components/teracom/diagnostics.py +++ b/custom_components/teracom/diagnostics.py @@ -1,4 +1,5 @@ """Diagnostics support for Teracom.""" + from __future__ import annotations from homeassistant.components.diagnostics import async_redact_data @@ -16,11 +17,9 @@ async def async_get_config_entry_diagnostics( ) -> dict: """Return diagnostics for a config entry.""" - diagnostics_data = { + return { "config_entry_data": async_redact_data(dict(config_entry.data), TO_REDACT), "data": async_redact_data( hass.data[DOMAIN][config_entry.entry_id]["data_dict"], TO_REDACT ), } - - return diagnostics_data