Skip to content
Snippets Groups Projects
Commit 44bd29168d14 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

releasenotes: make the import of fuzzywuzzy optional

If fuzzywuzzy is note present, we will not be having the capability to merge
existing releasenotes with the new releasenotes on the similarity basis.
The merging will still work good for exact same releasenotes entries.

Differential Revision: https://phab.mercurial-scm.org/D1096
parent 3a65012be661
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,12 @@
"""
Returns false when note fragment can be merged to existing notes.
"""
import fuzzywuzzy.fuzz as fuzz
try:
import fuzzywuzzy.fuzz as fuzz
fuzz.token_set_ratio
except ImportError:
return True
merge = True
for bullet in existingnotes:
score = fuzz.token_set_ratio(incoming_str, bullet)
......
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