Fix E711 comparison to None should be if cond is None:

This commit is contained in:
Jesse Mullan
2014-11-01 16:22:05 -07:00
parent 5ede29b401
commit 015d269667
12 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -206,8 +206,8 @@ def string_dist(str1, str2):
an edit distance, normalized by the string length, with a number of
tweaks that reflect intuition about text.
"""
if str1 == None and str2 == None: return 0.0
if str1 == None or str2 == None: return 1.0
if str1 is None and str2 is None: return 0.0
if str1 is None or str2 is None: return 1.0
str1 = str1.lower()
str2 = str2.lower()