Enable Ruff RUF019 (#115396)

* Enable Ruff RUF019

* fix tado tests

* review comments
This commit is contained in:
Sid 2024-04-24 07:23:24 +02:00 committed by GitHub
parent 4a59ee978c
commit b37f7b1ff0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 11 additions and 13 deletions

View file

@ -1106,7 +1106,7 @@ def empty_config_schema(domain: str) -> Callable[[dict], dict]:
"""Return a config schema which logs if there are configuration parameters."""
def validator(config: dict) -> dict:
if domain in config and config[domain]:
if config_domain := config.get(domain):
get_integration_logger(__name__).error(
(
"The %s integration does not support any configuration parameters, "
@ -1114,7 +1114,7 @@ def empty_config_schema(domain: str) -> Callable[[dict], dict]:
"configuration."
),
domain,
config[domain],
config_domain,
)
return config