From 93b7b66cda7e00b2d9c7dd503a4fedbfa9802eaf Mon Sep 17 00:00:00 2001 From: Joey Pinhas Date: Fri, 13 Sep 2019 14:38:40 -0400 Subject: [PATCH] Remove erroneoous print statement --- pre_commit_hooks/pretty_format_json.py | 1 - tests/pretty_format_json_test.py | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/pre_commit_hooks/pretty_format_json.py b/pre_commit_hooks/pretty_format_json.py index 3626332..8bf61c0 100644 --- a/pre_commit_hooks/pretty_format_json.py +++ b/pre_commit_hooks/pretty_format_json.py @@ -60,7 +60,6 @@ def get_diff(source, target): # type: (str, str) -> str source_lines = source.splitlines(True) target_lines = target.splitlines(True) diff = ''.join(difflib.ndiff(source_lines, target_lines)) - print(diff) return diff diff --git a/tests/pretty_format_json_test.py b/tests/pretty_format_json_test.py index 3aca165..d95465d 100644 --- a/tests/pretty_format_json_test.py +++ b/tests/pretty_format_json_test.py @@ -126,21 +126,6 @@ def test_diffing_output(capsys): + "foo": "bar" } - { -- "foo": -- "bar", -- "alist": [2, 34, 234], -+ "alist": [ -+ 2, -+ 34, -+ 234 -+ ], -- "blah": null -+ "blah": null, -? + -+ "foo": "bar" - } - ''' # output should include a line with the filepath, build it here