Use assignment expressions 08 (#57788)

This commit is contained in:
Marc Mueller 2021-10-17 20:02:42 +02:00 committed by GitHub
parent 5048bad050
commit d5116810d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 62 additions and 109 deletions

View file

@ -53,8 +53,7 @@ class DiscoveryFlowHandler(config_entries.ConfigFlow):
# Get current discovered entries.
in_progress = self._async_in_progress()
has_devices = in_progress
if not has_devices:
if not (has_devices := in_progress):
has_devices = await self.hass.async_add_job( # type: ignore
self._discovery_function, self.hass
)