Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cat-bro committed Jun 12, 2024
1 parent 5608f18 commit 3ee6136
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tpv/core/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ee6136

Please sign in to comment.