From caf63bb1fcb1cef6c04536d57b9d2bb018d74f44 Mon Sep 17 00:00:00 2001 From: Snuffy2 Date: Mon, 7 Aug 2023 22:22:08 -0400 Subject: [PATCH] Fix potential mutable dict issue --- 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(