[diffoscope] 01/04: Reflow re_diff_line_numbers

Chris Lamb chris at chris-lamb.co.uk
Tue Dec 27 18:16:45 CET 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit bfed70745f223232ef04fa76d6957f2099171c98
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Dec 27 17:10:53 2016 +0000

    Reflow re_diff_line_numbers
---
 tests/comparators/utils.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/comparators/utils.py b/tests/comparators/utils.py
index 1ffdde3..81cc6bd 100644
--- a/tests/comparators/utils.py
+++ b/tests/comparators/utils.py
@@ -31,6 +31,8 @@ from diffoscope.presenters.html import output_html
 from diffoscope.presenters.text import output_text
 from diffoscope.comparators.binary import FilesystemFile, NonExistingFile
 
+re_diff_line_numbers = re.compile(r"(^|\n)@@ -(\d+),(\d+) \+(\d+),(\d+) @@(?=\n|$)")
+
 
 def tools_missing(*required):
     return not required or any(find_executable(x) is None for x in required)
@@ -76,7 +78,5 @@ def assert_non_existing(monkeypatch, fixture, has_null_source=True, has_details=
     assert not has_details or len(difference.details) > 0
     assert not has_null_source or difference.details[-1].source2 == '/dev/null'
 
-DIFF_LINE_NUMBERS_RE = re.compile(r"(^|\n)@@ -(\d+),(\d+) \+(\d+),(\d+) @@(?=\n|$)")
-
 def diff_ignore_line_numbers(diff):
-    return DIFF_LINE_NUMBERS_RE.sub(r"\1@@ -XX,XX +XX,XX @@", diff)
+    return re_diff_line_numbers.sub(r"\1@@ -XX,XX +XX,XX @@", diff)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list