Skip to content

Commit 54097ee

Browse files
committed
remove whitespace & print statements
1 parent c7c5831 commit 54097ee

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/academic_tracker/helper_functions.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -685,17 +685,10 @@ def _compute_common_phrase_percent(prev_citation, new_citation, characters_to_re
685685
prev_citation_common_phrases_removed = prev_citation_common_phrases_removed.replace(phrase.strip(), "")
686686
new_citation_common_phrases_removed = new_citation_common_phrases_removed.replace(phrase.strip(), "")
687687
common_base_string = "".join(common_subphrases)
688-
689688
prev_common_denom = len(common_base_string + prev_citation_common_phrases_removed.strip())
690689
new_common_denom = len(common_base_string + new_citation_common_phrases_removed.strip())
691-
692-
if prev_common_denom == 0 or new_common_denom == 0:
693-
print(f"WARN: similarity divide by zero")
694-
print(f"{prev_citation = }")
695-
print(f"{new_citation = }")
696-
print(f"\treturning None")
690+
if prev_common_denom == 0 or new_common_denom == 0:
697691
return None
698-
699692
prev_common_percentage = len(common_base_string) / prev_common_denom * 100
700693
new_common_percentage = len(common_base_string) / new_common_denom * 100
701694

0 commit comments

Comments
 (0)