From 23f9a77c15aaff50a8672b85e288d0412d4008b9 Mon Sep 17 00:00:00 2001 From: Patrick Strawderman Date: Sun, 6 Apr 2014 14:03:44 -0400 Subject: [PATCH] style cleanup --- setup.py | 6 +++--- src/ghdiff.py | 4 ++-- src/tests.py | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index feccb23..a3e47c7 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,6 @@ entry_points={ 'console_scripts': [ "ghdiff = ghdiff:main" - ] - }, - ) + ] + }, +) diff --git a/src/ghdiff.py b/src/ghdiff.py index 54ec0f0..1d039f6 100755 --- a/src/ghdiff.py +++ b/src/ghdiff.py @@ -85,8 +85,8 @@ def _colorize(diff): _next = [] while lines and len(_next) < 2: _next.append(lines.pop()) - if _next[0].startswith("+") and (len(_next) == 1 - or _next[1][0] not in ("+", "-")): + if _next[0].startswith("+") and ( + len(_next) == 1 or _next[1][0] not in ("+", "-")): aline, bline = _line_diff(line[1:], _next.pop(0)[1:]) yield '
-%s
' % (aline,) yield '
+%s
' % (bline,) diff --git a/src/tests.py b/src/tests.py index 38a9640..8d2a9f1 100644 --- a/src/tests.py +++ b/src/tests.py @@ -7,6 +7,7 @@ import tempfile import unittest + class GhDiffTest(unittest.TestCase): def write_file(self, text):