Enable Ruff SIM118 (#87772)

This commit is contained in:
Franck Nijhof
2023-02-15 12:39:12 +01:00
committed by GitHub
parent 2cdc741900
commit 9030ca05b1
30 changed files with 37 additions and 45 deletions

View File

@@ -52,7 +52,7 @@ async def test_config_flow(hass: HomeAssistant, platform) -> None:
def get_suggested(schema, key):
"""Get suggested value for key in voluptuous schema."""
for k in schema.keys():
for k in schema:
if k == key:
if k.description is None or "suggested_value" not in k.description:
return None