[diffoscope] 01/02: Flake8 comparators/json.py.
Chris Lamb
chris at chris-lamb.co.uk
Wed Jan 24 02:17:15 CET 2018
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 9bcbb517b77d631f556c6d4da9de00f37fe65070
Author: Chris Lamb <lamby at debian.org>
Date: Wed Jan 24 12:00:39 2018 +1100
Flake8 comparators/json.py.
---
diffoscope/comparators/json.py | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/diffoscope/comparators/json.py b/diffoscope/comparators/json.py
index 3f7e046..6ebe5cf 100644
--- a/diffoscope/comparators/json.py
+++ b/diffoscope/comparators/json.py
@@ -35,22 +35,34 @@ class JSONFile(File):
with open(file.path) as f:
try:
- file.parsed = json.load(f, object_pairs_hook=collections.OrderedDict)
+ file.parsed = json.load(
+ f,
+ object_pairs_hook=collections.OrderedDict,
+ )
except ValueError:
return False
return True
def compare_details(self, other, source=None):
- difference = Difference.from_text(self.dumps(self), self.dumps(other),
- self.path, other.path)
+ difference = Difference.from_text(
+ self.dumps(self),
+ self.dumps(other),
+ self.path,
+ other.path,
+ )
+
if difference:
return [difference]
- difference = Difference.from_text(self.dumps(self, sort_keys=False),
- self.dumps(other, sort_keys=False),
- self.path, other.path,
- comment="ordering differences only")
+ difference = Difference.from_text(
+ self.dumps(self, sort_keys=False),
+ self.dumps(other, sort_keys=False),
+ self.path,
+ other.path,
+ comment="ordering differences only",
+ )
+
return [difference]
@staticmethod
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list