Reformat PreferenceScore.adapt_score

master
Felix Stupp 2 years ago
parent ee9f89a87d
commit c766ca1c58
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -267,8 +267,15 @@ class PreferenceScore:
def __neg__(self) -> PreferenceScore:
return self * -1
def adapt_score(self, tagable: Tagable, score: float) -> PreferenceScore:
return (self & tagable.tag_hierachy.share_score(score)).calculate()
def adapt_score(
self,
tagable: Tagable,
score: float,
) -> PreferenceScore:
addition = (
tagable.tag_hierachy.share_score(score)
)
return (self & addition).calculate()
def calculate_score(self, object: Tagable) -> float:
return self.calculate_iter_score(object.all_tags)

Loading…
Cancel
Save