[diffoscope] 09/12: fix pep8 E231

Mattia Rizzolo mattia at debian.org
Sat Sep 9 22:04:39 CEST 2017


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

mattia pushed a commit to branch master
in repository diffoscope.

commit e088169db9d3ba926770fb47dd6c361a176dc21d
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Sep 9 21:57:02 2017 +0200

    fix pep8 E231
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 diffoscope/diff.py                 | 2 +-
 diffoscope/presenters/html/html.py | 4 ++--
 diffoscope/presenters/utils.py     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/diffoscope/diff.py b/diffoscope/diff.py
index 0dc142b..4c32a47 100644
--- a/diffoscope/diff.py
+++ b/diffoscope/diff.py
@@ -514,7 +514,7 @@ class SideBySideDiff(object):
             m = re.match(r"@@ -(\d+),?(\d*) \+(\d+),?(\d*)", l)
             if m:
                 yield from self.empty_buffer()
-                hunk_data = map(lambda x:x=="" and 1 or int(x), m.groups())
+                hunk_data = map(lambda x: x=="" and 1 or int(x), m.groups())
                 self.hunk_off1, self.hunk_size1, self.hunk_off2, self.hunk_size2 = hunk_data
                 self.line1, self.line2 = self.hunk_off1, self.hunk_off2
                 yield "H", (self.hunk_off1, self.hunk_size1, self.hunk_off2, self.hunk_size2)
diff --git a/diffoscope/presenters/html/html.py b/diffoscope/presenters/html/html.py
index 75ce8e0..ddbcd78 100644
--- a/diffoscope/presenters/html/html.py
+++ b/diffoscope/presenters/html/html.py
@@ -268,12 +268,12 @@ def output_footer(jquery_url=None):
 
 @contextlib.contextmanager
 def file_printer(directory, filename):
-    with codecs.open(os.path.join(directory,filename), 'w', encoding='utf-8') as f:
+    with codecs.open(os.path.join(directory, filename), 'w', encoding='utf-8') as f:
         yield f.write
 
 @contextlib.contextmanager
 def spl_file_printer(directory, filename, accum):
-    with codecs.open(os.path.join(directory,filename), 'w', encoding='utf-8') as f:
+    with codecs.open(os.path.join(directory, filename), 'w', encoding='utf-8') as f:
         print_func = f.write
         def recording_print_func(s):
             print_func(s)
diff --git a/diffoscope/presenters/utils.py b/diffoscope/presenters/utils.py
index a515c4c..dd70aed 100644
--- a/diffoscope/presenters/utils.py
+++ b/diffoscope/presenters/utils.py
@@ -35,7 +35,7 @@ def round_sigfig(num, s):
 def sizeof_fmt(num, suffix='B', sigfig=3):
     # https://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size
     # A more powerful version is python3-hurry.filesize but that's an extra dependency
-    for unit in ['','K','M','G','T','P','E','Z']:
+    for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']:
         if abs(num) < 1024.0:
             break
         num /= 1024.0

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


More information about the diffoscope mailing list