From f96b9c8a230ba936c68f5d2e9a0b7d42843b9be5 Mon Sep 17 00:00:00 2001 From: bendikro Date: Mon, 31 Oct 2016 22:08:36 +0100 Subject: [PATCH] [Lint] Enable pylint warning super-init-not-called --- .pylintrc | 2 +- deluge/error.py | 3 ++- deluge/tests/test_httpdownloader.py | 1 + deluge/ui/console/widgets/fields.py | 1 + deluge/ui/console/widgets/inputpane.py | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pylintrc b/.pylintrc index 96b9fb3c3..599a43898 100644 --- a/.pylintrc +++ b/.pylintrc @@ -82,7 +82,7 @@ disable= too-many-nested-blocks, too-many-return-statements, # Warning unused-argument, protected-access, import-error, unused-variable, - attribute-defined-outside-init, super-init-not-called, + attribute-defined-outside-init, # Warning msgs that should eventually be enabled: arguments-differ, global-statement, fixme, broad-except diff --git a/deluge/error.py b/deluge/error.py index 4acd09e4d..f0fb6d80c 100644 --- a/deluge/error.py +++ b/deluge/error.py @@ -18,6 +18,7 @@ class DelugeError(Exception): return inst def __init__(self, message=None): + super(DelugeError, self).__init__(message) self.message = message def __str__(self): @@ -43,7 +44,7 @@ class InvalidPathError(DelugeError): class WrappedException(DelugeError): def __init__(self, message, exception_type, traceback): - self.message = message + super(WrappedException, self).__init__(message) self.type = exception_type self.traceback = traceback diff --git a/deluge/tests/test_httpdownloader.py b/deluge/tests/test_httpdownloader.py index d68f3ffdb..ae381cc50 100644 --- a/deluge/tests/test_httpdownloader.py +++ b/deluge/tests/test_httpdownloader.py @@ -63,6 +63,7 @@ class GzipResource(Resource): class PartialDownloadResource(Resource): def __init__(self, *args, **kwargs): + Resource.__init__(self) self.render_count = 0 def render(self, request): diff --git a/deluge/ui/console/widgets/fields.py b/deluge/ui/console/widgets/fields.py index 06e3ff49f..acbf03d90 100644 --- a/deluge/ui/console/widgets/fields.py +++ b/deluge/ui/console/widgets/fields.py @@ -29,6 +29,7 @@ log = logging.getLogger(__name__) class BaseField(InputKeyHandler): def __init__(self, parent=None, name=None, selectable=True, **kwargs): + super(BaseField, self).__init__() self.name = name self.parent = parent self.fmt_keys = {} diff --git a/deluge/ui/console/widgets/inputpane.py b/deluge/ui/console/widgets/inputpane.py index 243d585dd..ce1b92383 100644 --- a/deluge/ui/console/widgets/inputpane.py +++ b/deluge/ui/console/widgets/inputpane.py @@ -31,6 +31,7 @@ class BaseInputPane(InputKeyHandler): def __init__(self, mode, allow_rearrange=False, immediate_action=False, set_first_input_active=True, border_off_west=0, border_off_north=0, border_off_east=0, border_off_south=0, active_wrap=False, **kwargs): + InputKeyHandler.__init__(self) self.inputs = [] self.mode = mode self.active_input = 0