Skip to content
Snippets Groups Projects
Commit 7ec9db5d authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Correctly invert "X% similar" value and do not emit "100% similar". (Closes:...

Correctly invert "X% similar" value and do not emit "100% similar". (Closes: #391)
parent e748a477
No related branches found
No related tags found
No related merge requests found
Pipeline #736341 passed
......@@ -164,8 +164,12 @@ class Container(metaclass=abc.ABCMeta):
for my_name, other_name, score in self.perform_fuzzy_matching(
my_members, other_members
):
score_display = score / 400.0 * 100
comment = f"Files {score_display:.0f}% similar despite different names"
percentage = (1 - (score / 400.0)) * 100
if percentage >= 99:
percentage = 99
comment = (
f"Files {percentage:.0f}% similar despite different names"
)
if score == 0:
comment = "Files identical despite different names"
yield prep_yield(my_name, other_name, comment)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment