Apply late review comments on media player (#106727)
This commit is contained in:
parent
77cdc10883
commit
5eb1073b4a
1 changed files with 3 additions and 11 deletions
|
@ -27,7 +27,7 @@ SIGNIFICANT_ATTRIBUTES: set[str] = {
|
|||
ATTR_ENTITY_PICTURE_LOCAL,
|
||||
ATTR_GROUP_MEMBERS,
|
||||
*ATTR_TO_PROPERTY,
|
||||
}
|
||||
} - INSIGNIFICANT_ATTRIBUTES
|
||||
|
||||
|
||||
@callback
|
||||
|
@ -44,18 +44,10 @@ def async_check_significant_change(
|
|||
return True
|
||||
|
||||
old_attrs_s = set(
|
||||
{
|
||||
k: v
|
||||
for k, v in old_attrs.items()
|
||||
if k in SIGNIFICANT_ATTRIBUTES - INSIGNIFICANT_ATTRIBUTES
|
||||
}.items()
|
||||
{k: v for k, v in old_attrs.items() if k in SIGNIFICANT_ATTRIBUTES}.items()
|
||||
)
|
||||
new_attrs_s = set(
|
||||
{
|
||||
k: v
|
||||
for k, v in new_attrs.items()
|
||||
if k in SIGNIFICANT_ATTRIBUTES - INSIGNIFICANT_ATTRIBUTES
|
||||
}.items()
|
||||
{k: v for k, v in new_attrs.items() if k in SIGNIFICANT_ATTRIBUTES}.items()
|
||||
)
|
||||
changed_attrs: set[str] = {item[0] for item in old_attrs_s ^ new_attrs_s}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue