From eee53755dd3cd9efe74fab30b8fe752c3322dba2 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 3 Dec 2021 10:39:03 +0000 Subject: [PATCH] Avoid mutable default arguments --- tests/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/common.py b/tests/common.py index cf06ba4dea..3c485b1a77 100644 --- a/tests/common.py +++ b/tests/common.py @@ -897,8 +897,9 @@ def init_recorder_component(hass, add_config=None): _LOGGER.info("In-memory recorder successfully started") -async def async_init_recorder_component(hass, config={}): +async def async_init_recorder_component(hass, add_config=None): """Initialize the recorder asynchronously.""" + config = add_config or {} if recorder.CONF_DB_URL not in config: config[recorder.CONF_DB_URL] = "sqlite://"