[diffoscope] 04/04: Compare None using identify, not equality.
Chris Lamb
chris at chris-lamb.co.uk
Sat Sep 9 12:29:51 CEST 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 69359babff5564d6d975e0c852041451efa9d618
Author: Chris Lamb <lamby at debian.org>
Date: Sat Sep 9 11:29:32 2017 +0100
Compare None using identify, not equality.
---
diffoscope/comparators/utils/fuzzy.py | 2 +-
diffoscope/diff.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/diffoscope/comparators/utils/fuzzy.py b/diffoscope/comparators/utils/fuzzy.py
index 7b4a40a..1dcc657 100644
--- a/diffoscope/comparators/utils/fuzzy.py
+++ b/diffoscope/comparators/utils/fuzzy.py
@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
def perform_fuzzy_matching(members1, members2):
- if tlsh == None or Config().fuzzy_threshold == 0:
+ if tlsh is None or Config().fuzzy_threshold == 0:
return
already_compared = set()
# Perform local copies because they will be modified by consumer
diff --git a/diffoscope/diff.py b/diffoscope/diff.py
index f5d79fb..0dc142b 100644
--- a/diffoscope/diff.py
+++ b/diffoscope/diff.py
@@ -448,13 +448,13 @@ class SideBySideDiff(object):
orig1 = s1
orig2 = s2
- if s1 == None and s2 == None:
+ if s1 is None and s2 is None:
type_name = "unmodified"
elif s1 == "" and s2 == "":
type_name = "unmodified"
- elif s1 == None or s1 == "":
+ elif s1 is None or s1 == "":
type_name = "added"
- elif s2 == None or s2 == "":
+ elif s2 is None or s2 == "":
type_name = "deleted"
elif orig1 == orig2 and not s1.endswith('lines removed ]') and not s2.endswith('lines removed ]'):
type_name = "unmodified"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list