[diffoscope] 01/03: Allow the "source" param to overridden compare() methods to be given as a positional argument
Ximin Luo
infinity0 at debian.org
Mon May 29 12:17:00 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch experimental
in repository diffoscope.
commit 1e8d07af0789a736cb6faca5b81b9bd0a4a9142c
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon May 29 13:04:12 2017 +0200
Allow the "source" param to overridden compare() methods to be given as a positional argument
---
diffoscope/comparators/apk.py | 4 ++--
diffoscope/comparators/debian.py | 4 ++--
diffoscope/comparators/debian_fallback.py | 12 ++++++------
diffoscope/comparators/ps.py | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/diffoscope/comparators/apk.py b/diffoscope/comparators/apk.py
index 8263624..1d4aa0d 100644
--- a/diffoscope/comparators/apk.py
+++ b/diffoscope/comparators/apk.py
@@ -136,13 +136,13 @@ class ApkContainer(Archive):
diff_manifests.add_comment(comment)
return diff_manifests
- def compare(self, other, **kwargs):
+ def compare(self, other, *args, **kwargs):
differences = []
try:
differences.append(self.compare_manifests(other))
except AttributeError: # no apk-specific methods, e.g. MissingArchive
pass
- differences.extend(super().compare(other, **kwargs))
+ differences.extend(super().compare(other, *args, **kwargs))
return differences
class ApkFile(File):
diff --git a/diffoscope/comparators/debian.py b/diffoscope/comparators/debian.py
index c0aaf8b..a5e7900 100644
--- a/diffoscope/comparators/debian.py
+++ b/diffoscope/comparators/debian.py
@@ -178,8 +178,8 @@ class DotChangesFile(DebControlFile):
return True
- def compare(self, other, **kwargs):
- differences = super().compare(other, **kwargs)
+ def compare(self, other, *args, **kwargs):
+ differences = super().compare(other, *args, **kwargs)
if differences is None:
return None
diff --git a/diffoscope/comparators/debian_fallback.py b/diffoscope/comparators/debian_fallback.py
index 90858b1..e075ee2 100644
--- a/diffoscope/comparators/debian_fallback.py
+++ b/diffoscope/comparators/debian_fallback.py
@@ -25,8 +25,8 @@ from .text import TextFile
class DotChangesFile(TextFile):
RE_FILE_EXTENSION = re.compile(r'\.changes$')
- def compare(self, other, **kwargs):
- difference = super().compare(other, **kwargs)
+ def compare(self, other, *args, **kwargs):
+ difference = super().compare(other, *args, **kwargs)
if not difference:
return None
difference.add_comment('Unable to find Python debian module. Falling back to text comparison.')
@@ -35,8 +35,8 @@ class DotChangesFile(TextFile):
class DotDscFile(TextFile):
RE_FILE_EXTENSION = re.compile(r'\.dsc$')
- def compare(self, other, **kwargs):
- difference = super().compare(other, **kwargs)
+ def compare(self, other, *args, **kwargs):
+ difference = super().compare(other, *args, **kwargs)
if not difference:
return None
difference.add_comment('Unable to find Python debian module. Falling back to text comparison.')
@@ -45,8 +45,8 @@ class DotDscFile(TextFile):
class DotBuildinfoFile(TextFile):
RE_FILE_EXTENSION = re.compile(r'\.buildinfo$')
- def compare(self, other, **kwargs):
- difference = super().compare(other, **kwargs)
+ def compare(self, other, *args, **kwargs):
+ difference = super().compare(other, *args, **kwargs)
if not difference:
return None
difference.add_comment('Unable to find Python debian module. Falling back to text comparison.')
diff --git a/diffoscope/comparators/ps.py b/diffoscope/comparators/ps.py
index ea94b9e..650da45 100644
--- a/diffoscope/comparators/ps.py
+++ b/diffoscope/comparators/ps.py
@@ -39,8 +39,8 @@ class Pstotext(Command):
class PsFile(TextFile):
RE_FILE_TYPE = re.compile(r'^PostScript document\b')
- def compare(self, other, **kwargs):
- differences = super().compare(other, **kwargs)
+ def compare(self, other, *args, **kwargs):
+ differences = super().compare(other, *args, **kwargs)
details = None
try:
details = Difference.from_command(Pstotext, self.path, other.path)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the Reproducible-commits
mailing list