Use assignment expressions [A-I] (#66880)

This commit is contained in:
Marc Mueller
2022-02-19 17:21:26 +01:00
committed by GitHub
parent 6e49b0e122
commit 4f20a8023b
18 changed files with 20 additions and 43 deletions

View File

@@ -60,9 +60,7 @@ def deflection_entities_list(
_LOGGER.debug("The FRITZ!Box has no %s options", SWITCH_TYPE_DEFLECTION)
return []
deflection_list = avm_wrapper.get_ontel_deflections()
if not deflection_list:
if not (deflection_list := avm_wrapper.get_ontel_deflections()):
return []
items = xmltodict.parse(deflection_list["NewDeflectionList"])["List"]["Item"]