From 33341cf7366fc77b6c615af459bb130dece04142 Mon Sep 17 00:00:00 2001 From: Snuffy2 Date: Mon, 9 Oct 2023 14:03:19 -0400 Subject: [PATCH] Fix potential mutable dict issue (#44) --- custom_components/healthchecksio/config_flow.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/custom_components/healthchecksio/config_flow.py b/custom_components/healthchecksio/config_flow.py index 217cf5c..bab7eff 100644 --- a/custom_components/healthchecksio/config_flow.py +++ b/custom_components/healthchecksio/config_flow.py @@ -1,11 +1,12 @@ """Adds config flow for Blueprint.""" -import async_timeout import asyncio from collections import OrderedDict + +import async_timeout import voluptuous as vol +from homeassistant import config_entries from homeassistant.helpers.aiohttp_client import async_get_clientsession from integrationhelper import Logger -from homeassistant import config_entries from .const import DOMAIN, DOMAIN_DATA, OFFICIAL_SITE_ROOT @@ -22,9 +23,7 @@ def __init__(self): self._errors = {} self.initial_data = None - async def async_step_user( - self, user_input={} - ): # pylint: disable=dangerous-default-value + async def async_step_user(self, user_input=None): """Handle a flow initialized by the user.""" self._errors = {} if self._async_current_entries(): @@ -78,9 +77,7 @@ async def _show_initial_config_form(self, user_input): step_id="user", data_schema=vol.Schema(data_schema), errors=self._errors ) - async def async_step_self_hosted( - self, user_input={} - ): # pylint: disable=dangerous-default-value + async def async_step_self_hosted(self, user_input): """Handle the step for a self-hosted instance.""" self._errors = {} valid = await self._test_credentials(