Use assignment expressions 20 (#57969)

This commit is contained in:
Marc Mueller 2021-10-20 20:31:00 +02:00 committed by GitHub
parent 398061706c
commit 487fa0a905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 29 additions and 52 deletions

View file

@ -31,8 +31,7 @@ async def async_setup_entry(hass, config_entry):
hass.config_entries.async_setup_platforms(config_entry, PLATFORMS)
def _element_changed(element, changeset):
change = changeset.get("last_change")
if change is None:
if (change := changeset.get("last_change")) is None:
return
if change.get("command") is None:
return