Use assignment expressions 33 (#58717)

This commit is contained in:
Marc Mueller 2021-10-30 16:32:41 +02:00 committed by GitHub
parent b1d49b3b66
commit 7063c05127
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 22 additions and 52 deletions

View file

@ -54,9 +54,7 @@ class CloudPreferences:
async def async_initialize(self):
"""Finish initializing the preferences."""
prefs = await self._store.async_load()
if prefs is None:
if (prefs := await self._store.async_load()) is None:
prefs = self._empty_config("")
self._prefs = prefs