Use assignment expressions 34 (#58823)

This commit is contained in:
Marc Mueller
2021-10-31 19:01:16 +01:00
committed by GitHub
parent e0c0d00833
commit 4c68662612
30 changed files with 36 additions and 75 deletions

View File

@@ -173,9 +173,7 @@ class EntityComponent:
"""Unload a config entry."""
key = config_entry.entry_id
platform = self._platforms.pop(key, None)
if platform is None:
if (platform := self._platforms.pop(key, None)) is None:
raise ValueError("Config entry was never loaded!")
await platform.async_reset()