[Reproducible-commits] [diffoscope] 01/13: Use super() instead of the old cumbersome form
Jérémy Bobbio
lunar at moszumanska.debian.org
Thu Oct 15 16:04:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository diffoscope.
commit b616f991e4ff1bc7fe9f47dd44bf6787d07ebc78
Author: Jérémy Bobbio <lunar at debian.org>
Date: Fri Sep 25 13:11:49 2015 +0000
Use super() instead of the old cumbersome form
Now that we are using Python 3, we can switch to the nicer super() syntax:
http://www.python.org/dev/peps/pep-3135
---
diffoscope/comparators/deb.py | 4 ++--
diffoscope/comparators/elf.py | 4 ++--
diffoscope/comparators/gettext.py | 2 +-
diffoscope/comparators/iso9660.py | 2 +-
diffoscope/comparators/java.py | 2 +-
diffoscope/comparators/libarchive.py | 2 +-
diffoscope/comparators/utils.py | 2 +-
diffoscope/difference.py | 4 ++--
8 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/diffoscope/comparators/deb.py b/diffoscope/comparators/deb.py
index e192b94..6888328 100644
--- a/diffoscope/comparators/deb.py
+++ b/diffoscope/comparators/deb.py
@@ -127,12 +127,12 @@ class Md5sumsFile(File):
class DebTarContainer(TarContainer):
def __init__(self, archive, ignore_files):
- super(DebTarContainer, self).__init__(archive)
+ super().__init__(archive)
assert type(ignore_files) is set
self._ignore_files = ignore_files
def get_member_names(self):
- names = set(super(DebTarContainer, self).get_member_names())
+ names = set(super().get_member_names())
logger.debug('Ignoring %d/%d files known identical in data.tar', len(self._ignore_files), len(names))
return names - self._ignore_files
diff --git a/diffoscope/comparators/elf.py b/diffoscope/comparators/elf.py
index 7e6a656..3e138c1 100644
--- a/diffoscope/comparators/elf.py
+++ b/diffoscope/comparators/elf.py
@@ -27,7 +27,7 @@ from diffoscope.difference import Difference
class Readelf(Command):
def __init__(self, *args, **kwargs):
- super(Readelf, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
# we don't care about the name of the archive
self._archive_re = re.compile(r'^File: %s\(' % re.escape(self.path))
self._basename = os.path.basename(self.path)
@@ -55,7 +55,7 @@ class ReadelfDebugDump(Readelf):
class ObjdumpDisassemble(Command):
def __init__(self, *args, **kwargs):
- super(ObjdumpDisassemble, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
# we don't care about the name of the archive
self._archive_re = re.compile(r'^In archive %s:' % re.escape(self.path))
self._basename = os.path.basename(self.path)
diff --git a/diffoscope/comparators/gettext.py b/diffoscope/comparators/gettext.py
index d5812d7..6ded32d 100644
--- a/diffoscope/comparators/gettext.py
+++ b/diffoscope/comparators/gettext.py
@@ -30,7 +30,7 @@ class Msgunfmt(Command):
CHARSET_RE = re.compile(rb'^"Content-Type: [^;]+; charset=([^\\]+)\\n"$')
def __init__(self, *args, **kwargs):
- super(Msgunfmt, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self._header = BytesIO()
self._encoding = None
diff --git a/diffoscope/comparators/iso9660.py b/diffoscope/comparators/iso9660.py
index 7d91824..cf21ccf 100644
--- a/diffoscope/comparators/iso9660.py
+++ b/diffoscope/comparators/iso9660.py
@@ -43,7 +43,7 @@ class ISO9660PVD(Command):
class ISO9660Listing(Command):
def __init__(self, path, extension=None, *args, **kwargs):
self._extension = extension
- super(ISO9660Listing, self).__init__(path, *args, **kwargs)
+ super().__init__(path, *args, **kwargs)
@tool_required('isoinfo')
def cmdline(self):
diff --git a/diffoscope/comparators/java.py b/diffoscope/comparators/java.py
index 6027f71..abf9972 100644
--- a/diffoscope/comparators/java.py
+++ b/diffoscope/comparators/java.py
@@ -28,7 +28,7 @@ from diffoscope.difference import Difference
class Javap(Command):
def __init__(self, path, *args, **kwargs):
- super(Javap, self).__init__(path, *args, **kwargs)
+ super().__init__(path, *args, **kwargs)
self.real_path = os.path.realpath(path)
@tool_required('javap')
diff --git a/diffoscope/comparators/libarchive.py b/diffoscope/comparators/libarchive.py
index 8d8537b..f8d5b4f 100644
--- a/diffoscope/comparators/libarchive.py
+++ b/diffoscope/comparators/libarchive.py
@@ -40,7 +40,7 @@ if not hasattr(libarchive.ffi, 'entry_rdevminor'):
class LibarchiveMember(ArchiveMember):
def __init__(self, archive, entry):
- super(LibarchiveMember, self).__init__(archive, entry.pathname)
+ super().__init__(archive, entry.pathname)
def is_directory(self):
return False
diff --git a/diffoscope/comparators/utils.py b/diffoscope/comparators/utils.py
index e2aed5b..2a0d209 100644
--- a/diffoscope/comparators/utils.py
+++ b/diffoscope/comparators/utils.py
@@ -243,7 +243,7 @@ class ArchiveMember(File):
class Archive(Container, metaclass=ABCMeta):
def __init__(self, *args, **kwargs):
- super(Archive, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self._archive = None
@contextmanager
diff --git a/diffoscope/difference.py b/diffoscope/difference.py
index 3c75362..2202afa 100644
--- a/diffoscope/difference.py
+++ b/diffoscope/difference.py
@@ -166,12 +166,12 @@ def run_diff(fd1, fd2, end_nl_q1, end_nl_q2):
# inspired by https://stackoverflow.com/a/6874161
class ExThread(Thread):
def __init__(self, *args, **kwargs):
- super(ExThread, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
self.__status_queue = Queue()
def run(self, *args, **kwargs):
try:
- super(ExThread, self).run(*args, **kwargs)
+ super().run(*args, **kwargs)
except Exception as ex:
#except_type, except_class, tb = sys.exc_info()
self.__status_queue.put(ex)
--
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