diff --git a/tpv/core/entities.py b/tpv/core/entities.py index 1847ee8..e27a3f5 100644 --- a/tpv/core/entities.py +++ b/tpv/core/entities.py @@ -151,8 +151,8 @@ def score(self, other: TagSetManager) -> bool: """ def a_prefers_b(a_tags, b_tags): return any( - tag for tag in a_tags.filter(tag_type = TagType.PREFER) - if list(b_tags.filter(tag_type = [TagType.ACCEPT, TagType.PREFER, TagType.REQUIRE], tag_value = tag.value)) + tag for tag in a_tags.filter(tag_type=TagType.PREFER) + if list(b_tags.filter(tag_type=[TagType.ACCEPT, TagType.PREFER, TagType.REQUIRE], tag_value=tag.value)) ) score = 1 if a_prefers_b(self.tags, other.tags) or a_prefers_b(other.tags, self.tags) else 0 return score