D6123: Experimental features: Add condition to for float number (issue6099)

av6 (Anton Shestakov) phabricator at mercurial-scm.org
Wed Mar 13 05:23:50 EDT 2019


av6 added inline comments.

INLINE COMMENTS

> similar.py:67
> +    if lengths > 0:
>      return equal * 2.0 / lengths
>  

This returns None in some cases, and code that uses `_score()` and `score()` tries to compare it to an integer. In Python3 `None > 1` raises TypeError.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6123

To: akshjain.jain74, durin42, #hg-reviewers
Cc: av6, pulkit, mercurial-devel


More information about the Mercurial-devel mailing list