comparison hgext/releasenotes.py @ 34780:070ba789f4d0

releasenotes: fix documentation of similaritycheck() The function document says that it returns true when the fragment can be merged, but if you see the function just above it which is similar(), it writes already exists thing if return value from similaritycheck() is False which is just opposite of the doc. This patch fixes that. Differential Revision: https://phab.mercurial-scm.org/D1119
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 16 Oct 2017 22:19:02 +0530
parents 25b5787e8dde
children 44bd29168d14
comparison
equal deleted inserted replaced
34779:cfb054a7ecc4 34780:070ba789f4d0
214 else: 214 else:
215 return False 215 return False
216 216
217 def similaritycheck(incoming_str, existingnotes): 217 def similaritycheck(incoming_str, existingnotes):
218 """ 218 """
219 Returns true when note fragment can be merged to existing notes. 219 Returns false when note fragment can be merged to existing notes.
220 """ 220 """
221 import fuzzywuzzy.fuzz as fuzz 221 import fuzzywuzzy.fuzz as fuzz
222 merge = True 222 merge = True
223 for bullet in existingnotes: 223 for bullet in existingnotes:
224 score = fuzz.token_set_ratio(incoming_str, bullet) 224 score = fuzz.token_set_ratio(incoming_str, bullet)