[diffoscope] 06/12: fix pep8 E128

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 e03bbafe5874e3bb6ee8296c37fd5fc2354cf560
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sat Sep 9 21:54:51 2017 +0200

    fix pep8 E128
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 diffoscope/changes.py                |  2 +-
 diffoscope/comparators/deb.py        |  4 ++--
 diffoscope/comparators/dex.py        |  2 +-
 diffoscope/comparators/json.py       |  2 +-
 diffoscope/comparators/tar.py        |  4 ++--
 diffoscope/comparators/utils/file.py |  4 ++--
 diffoscope/main.py                   | 14 +++++++-------
 diffoscope/presenters/html/html.py   | 10 +++++-----
 diffoscope/presenters/utils.py       |  2 +-
 diffoscope/progress.py               |  2 +-
 tests/comparators/test_icc.py        |  2 +-
 tests/comparators/test_ico_image.py  |  2 +-
 tests/test_presenters.py             |  6 +++---
 tests/utils/tools.py                 |  2 +-
 14 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/diffoscope/changes.py b/diffoscope/changes.py
index 95dccaf..7fd5889 100644
--- a/diffoscope/changes.py
+++ b/diffoscope/changes.py
@@ -341,4 +341,4 @@ class Changes(object):
                     ))
             else:
                 logger.debug("%s Checksum for file %s matches",
-                    field_name, filename)
+                             field_name, filename)
diff --git a/diffoscope/comparators/deb.py b/diffoscope/comparators/deb.py
index 85e19e2..31029c7 100644
--- a/diffoscope/comparators/deb.py
+++ b/diffoscope/comparators/deb.py
@@ -175,5 +175,5 @@ class DebDataTarFile(File):
 
     def compare_details(self, other, source=None):
         return [Difference.from_text_readers(list_libarchive(self.path),
-                                        list_libarchive(other.path),
-                                        self.path, other.path, source="file list")]
+                                             list_libarchive(other.path),
+                                             self.path, other.path, source="file list")]
diff --git a/diffoscope/comparators/dex.py b/diffoscope/comparators/dex.py
index 3389987..642ab0e 100644
--- a/diffoscope/comparators/dex.py
+++ b/diffoscope/comparators/dex.py
@@ -49,7 +49,7 @@ class DexContainer(Archive):
         dest_path = os.path.join(dest_dir, member_name)
         logger.debug('dex extracting to %s', dest_path)
         subprocess.check_call(['enjarify', '-o', dest_path, self.source.path],
-            shell=False, stderr=None, stdout=subprocess.PIPE)
+                              shell=False, stderr=None, stdout=subprocess.PIPE)
         return dest_path
 
 class DexFile(File):
diff --git a/diffoscope/comparators/json.py b/diffoscope/comparators/json.py
index 76e2c6c..3f7e046 100644
--- a/diffoscope/comparators/json.py
+++ b/diffoscope/comparators/json.py
@@ -43,7 +43,7 @@ class JSONFile(File):
 
     def compare_details(self, other, source=None):
         difference = Difference.from_text(self.dumps(self), self.dumps(other),
-            self.path, other.path)
+                                          self.path, other.path)
         if difference:
             return [difference]
 
diff --git a/diffoscope/comparators/tar.py b/diffoscope/comparators/tar.py
index 7c2de1c..5adc8a9 100644
--- a/diffoscope/comparators/tar.py
+++ b/diffoscope/comparators/tar.py
@@ -34,5 +34,5 @@ class TarFile(File):
 
     def compare_details(self, other, source=None):
         return [Difference.from_text_readers(list_libarchive(self.path),
-                                        list_libarchive(other.path),
-                                        self.path, other.path, source="file list")]
+                                             list_libarchive(other.path),
+                                             self.path, other.path, source="file list")]
diff --git a/diffoscope/comparators/utils/file.py b/diffoscope/comparators/utils/file.py
index 204640f..4aaad6e 100644
--- a/diffoscope/comparators/utils/file.py
+++ b/diffoscope/comparators/utils/file.py
@@ -332,13 +332,13 @@ class File(object, metaclass=abc.ABCMeta):
                 if difference is None:
                     return None
                 difference.add_comment("Error parsing output of `%s` for %s" %
-                        (e.command, e.object_class))
+                                       (e.command, e.object_class))
             except ContainerExtractionError as e:
                 difference = self.compare_bytes(other, source=source)
                 if difference is None:
                     return None
                 difference.add_comment("Error extracting '{}', falling back to "
-                    "binary comparison ('{}')".format(e.pathname, e.wrapped_exc))
+                                       "binary comparison ('{}')".format(e.pathname, e.wrapped_exc))
             return difference
         return self.compare_bytes(other, source)
 
diff --git a/diffoscope/main.py b/diffoscope/main.py
index da79560..0f2cafa 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -74,11 +74,11 @@ def create_parser():
         description='Calculate differences between two files or directories',
         add_help=False)
     parser.add_argument('path1', nargs='?', help='First file or directory to '
-        'compare. If omitted, tries to read a diffoscope diff from stdin.')
+                        'compare. If omitted, tries to read a diffoscope diff from stdin.')
     parser.add_argument('path2', nargs='?', help='Second file or directory to '
-        'compare. If omitted, no comparison is done but instead we read a '
-        'diffoscope diff from path1 and will output this in the formats '
-        'specified by the rest of the command line.')
+                        'compare. If omitted, no comparison is done but instead we read a '
+                        'diffoscope diff from path1 and will output this in the formats '
+                        'specified by the rest of the command line.')
     parser.add_argument('--debug', action='store_true',
                         default=False, help='Display debug messages')
     parser.add_argument('--debugger', action='store_true',
@@ -247,9 +247,9 @@ def create_parser():
         if parsed_args.path2 is None:
             # warn about unusual flags in this mode
             ineffective_flags = [f
-                for x in group3._group_actions
-                    if getattr(parsed_args, x.dest) != x.default
-                for f in x.option_strings]
+                                 for x in group3._group_actions
+                                 if getattr(parsed_args, x.dest) != x.default
+                                 for f in x.option_strings]
             if ineffective_flags:
                 logger.warning("Loading diff instead of calculating it, but diff-calculation flags were given; they will be ignored:")
                 logger.warning(ineffective_flags)
diff --git a/diffoscope/presenters/html/html.py b/diffoscope/presenters/html/html.py
index 89035c2..75ce8e0 100644
--- a/diffoscope/presenters/html/html.py
+++ b/diffoscope/presenters/html/html.py
@@ -171,7 +171,7 @@ def output_node_frame(difference, path, indentstr, indentnum, body):
 {0[2]}<a class="anchor" href="#{4}" name="{4}">\xb6</a>
 {0[1]}</div>
 """.format(indent, dctrl_class, dctrl, sizeof_fmt(difference.size()), anchor,
-        html.escape(difference.source1))
+           html.escape(difference.source1))
     else:
         header = u"""{0[1]}<div class="{1} diffcontrol-double">{2}</div>
 {0[1]}<div><span class="diffsize">{3}</span></div>
@@ -180,8 +180,8 @@ def output_node_frame(difference, path, indentstr, indentnum, body):
 {0[2]}<a class="anchor" href="#{4}" name="{4}">\xb6</a>
 {0[1]}</div>
 """.format(indent, dctrl_class, dctrl, sizeof_fmt(difference.size()), anchor,
-        html.escape(difference.source1),
-        html.escape(difference.source2))
+           html.escape(difference.source1),
+           html.escape(difference.source2))
 
     return PartialString.numl(u"""{0[1]}<div class="diffheader">
 {1}{0[1]}</div>
@@ -284,7 +284,7 @@ def spl_file_printer(directory, filename, accum):
 
 
 class HTMLPrintContext(collections.namedtuple("HTMLPrintContext",
-        "target single_page jquery_url css_url our_css_url icon_url")):
+                                              "target single_page jquery_url css_url our_css_url icon_url")):
     @property
     def directory(self):
         return None if self.single_page else self.target
@@ -588,7 +588,7 @@ class HTMLPresenter(Presenter):
                 report_current = self.report_printed + sum(p.size(placeholder_len) for p in outputs.values())
                 want_to_add = node_output.size(placeholder_len)
                 logger.debug("report size: %s/%s, page size: %s/%s, want to add %s)",
-                    report_current, self.report_limit, page_current, page_limit, want_to_add)
+                             report_current, self.report_limit, page_current, page_limit, want_to_add)
                 if report_current + want_to_add > self.report_limit:
                     make_new_subpage = False
                 elif page_current + want_to_add < page_limit:
diff --git a/diffoscope/presenters/utils.py b/diffoscope/presenters/utils.py
index acf322a..a515c4c 100644
--- a/diffoscope/presenters/utils.py
+++ b/diffoscope/presenters/utils.py
@@ -284,7 +284,7 @@ class PartialString(object):
         # Remove unused and duplicates in the holes objects
         seen = collections.OrderedDict()
         mapping = tuple(FormatPlaceholder(seen.setdefault(k, len(seen))) if i in used_args else None
-            for i, k in enumerate(holes))
+                        for i, k in enumerate(holes))
         self._fmtstr = fmt.vformat(fmtstr, mapping, None)
         self.holes = tuple(seen.keys())
 
diff --git a/diffoscope/progress.py b/diffoscope/progress.py
index 1d5957e..454a742 100644
--- a/diffoscope/progress.py
+++ b/diffoscope/progress.py
@@ -155,7 +155,7 @@ class Progress(object):
                     (cur_child_total - cur_child_done)
                 assert own_done  # non-zero
                 return all_done, int(float(self.total) / own_done \
-                    * expected_all_done)
+                                     * expected_all_done)
         else:
             # nothing in progress
             assert not cur_child_estimate
diff --git a/tests/comparators/test_icc.py b/tests/comparators/test_icc.py
index f1674c5..2c70e87 100644
--- a/tests/comparators/test_icc.py
+++ b/tests/comparators/test_icc.py
@@ -45,7 +45,7 @@ def differences(icc1, icc2):
 def test_diff(differences):
     if 'ne_SU' in differences[0].unified_diff:
         pytest.skip("Endian-specific differences detected; see "
-            "<https://bugs.debian.org/847595>")
+                    "<https://bugs.debian.org/847595>")
 
     expected_diff = get_data('icc_expected_diff')
     assert differences[0].unified_diff == expected_diff
diff --git a/tests/comparators/test_ico_image.py b/tests/comparators/test_ico_image.py
index e1f2e97..8196c57 100644
--- a/tests/comparators/test_ico_image.py
+++ b/tests/comparators/test_ico_image.py
@@ -24,7 +24,7 @@ from diffoscope.config import Config
 
 from ..utils.data import load_fixture, get_data
 from ..utils.tools import (skip_unless_tools_exist,
-skip_unless_tool_is_at_least, skip_unless_tool_is_between)
+                           skip_unless_tool_is_at_least, skip_unless_tool_is_between)
 from .test_jpeg_image import identify_version
 
 
diff --git a/tests/test_presenters.py b/tests/test_presenters.py
index 3c0a2c0..5344b8d 100644
--- a/tests/test_presenters.py
+++ b/tests/test_presenters.py
@@ -188,16 +188,16 @@ def test_partial_string_numl():
 
 def test_partial_string_escape():
     tmpl = PartialString.numl("find {0} -name {1} " +
-               PartialString.escape("-exec ls -la {} \;"), 2)
+                              PartialString.escape("-exec ls -la {} \;"), 2)
     assert tmpl == PartialString('find {0} -name {1} -exec ls -la {{}} \\;', *tmpl.holes)
     assert tmpl.size() == 33
     assert tmpl.size(4) == 39
     assert tmpl == PartialString.numl("find {0} -name {1} -exec ls -la {2} \;", 3).pformat({2: "{}"})
 
     assert (tmpl.pformatl("my{}path", "my{}file") ==
-        PartialString('find my{{}}path -name my{{}}file -exec ls -la {{}} \\;'))
+            PartialString('find my{{}}path -name my{{}}file -exec ls -la {{}} \\;'))
     assert (tmpl.formatl("my{}path", "my{}file") ==
-        'find my{}path -name my{}file -exec ls -la {} \\;')
+            'find my{}path -name my{}file -exec ls -la {} \\;')
 
     esc = PartialString("{{}} {0}", None)
     assert esc.pformat({None: PartialString.of(None)}) == esc
diff --git a/tests/utils/tools.py b/tests/utils/tools.py
index 89090e8..025d305 100644
--- a/tests/utils/tools.py
+++ b/tests/utils/tools.py
@@ -65,7 +65,7 @@ def skip_unless_tool_is_between(tool, actual_ver, min_ver, max_ver, vcls=LooseVe
         (vcls(str(actual_ver)) < vcls(str(min_ver))) or
         (vcls(str(actual_ver)) > vcls(str(max_ver))),
         reason="requires {} >= {} >= {} ({} detected)".format(min_ver, tool,
-                                                            max_ver, actual_ver)
+                                                              max_ver, actual_ver)
     )
 
 def skip_if_binutils_does_not_support_x86():

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


More information about the diffoscope mailing list