Skip to content

Commit

Permalink
Ruff recommends
Browse files Browse the repository at this point in the history
  • Loading branch information
astrandb committed May 2, 2024
1 parent 27bb1e1 commit 132a4d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions custom_components/teracom/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config flow for Teracom TCW integration."""

import logging

import voluptuous as vol
Expand Down Expand Up @@ -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(
Expand Down
5 changes: 2 additions & 3 deletions custom_components/teracom/diagnostics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Diagnostics support for Teracom."""

from __future__ import annotations

from homeassistant.components.diagnostics import async_redact_data
Expand All @@ -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

0 comments on commit 132a4d6

Please sign in to comment.