Use assignment expressions [K-Z] (#66881)

This commit is contained in:
Marc Mueller
2022-02-19 17:19:46 +01:00
committed by GitHub
parent d76687d672
commit 6e49b0e122
20 changed files with 22 additions and 51 deletions

View File

@@ -134,8 +134,7 @@ class NestEventMediaStore(EventMediaStore):
"""Load data."""
if self._data is None:
self._devices = await self._get_devices()
data = await self._store.async_load()
if data is None:
if (data := await self._store.async_load()) is None:
_LOGGER.debug("Loaded empty event store")
self._data = {}
elif isinstance(data, dict):