Module: check_mk
Branch: master
Commit: 45e9dcb673407989173fb6aebb42553316f28651
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=45e9dcb6734079…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Jul 13 12:48:38 2018 +0200
Fixed and enabled useless-super-delegation warnings.
Change-Id: I9db58e6c5ddce7a1ddd6ec9f0d80cfc1c5fbbd54
---
cmk/gui/backup.py | 8 --------
cmk/gui/bi.py | 4 ----
cmk/gui/gui_background_job.py | 16 ----------------
cmk/gui/plugins/wato/background_job.py | 8 --------
cmk/gui/wato/__init__.py | 24 ------------------------
cmk/gui/wato/pages/sites.py | 4 ----
cmk/gui/watolib.py | 3 ---
tests/pylint/pylintrc | 4 ----
8 files changed, 71 deletions(-)
diff --git a/cmk/gui/backup.py b/cmk/gui/backup.py
index f4a54a6..829d459 100644
--- a/cmk/gui/backup.py
+++ b/cmk/gui/backup.py
@@ -539,10 +539,6 @@ class Jobs(BackupEntityCollection):
class PageBackup(object):
- def __init__(self):
- super(PageBackup, self).__init__()
-
-
def title(self):
raise NotImplementedError()
@@ -1089,10 +1085,6 @@ class Targets(BackupEntityCollection):
class PageBackupTargets(object):
- def __init__(self):
- super(PageBackupTargets, self).__init__()
-
-
def title(self):
raise NotImplementedError()
diff --git a/cmk/gui/bi.py b/cmk/gui/bi.py
index 3b113cd..b75e94f 100644
--- a/cmk/gui/bi.py
+++ b/cmk/gui/bi.py
@@ -811,10 +811,6 @@ class BISitedataManager(object):
class BIJobManager(object):
- def __init__(self):
- super(BIJobManager, self).__init__()
-
-
def _get_only_hosts_and_only_groups(self, aggr_ids, only_hosts, only_groups,
all_hosts):
all_groups = set([])
for (aggr_type, idx, aggr_groups) in aggr_ids:
diff --git a/cmk/gui/gui_background_job.py b/cmk/gui/gui_background_job.py
index 9031aa5..12b8534 100644
--- a/cmk/gui/gui_background_job.py
+++ b/cmk/gui/gui_background_job.py
@@ -149,22 +149,6 @@ class
GUIBackgroundJobSnapshottedFunctions(background_job.BackgroundJob):
return self.get_status().get("user") != config.user.id
- def is_running(self):
- return super(GUIBackgroundJobSnapshottedFunctions, self).is_running()
-
-
- def exists(self):
- return super(GUIBackgroundJobSnapshottedFunctions, self).exists()
-
-
- def get_job_id(self):
- return super(GUIBackgroundJobSnapshottedFunctions, self).get_job_id()
-
-
- def get_title(self):
- return super(GUIBackgroundJobSnapshottedFunctions, self).get_title()
-
-
class GUIBackgroundJob(GUIBackgroundJobSnapshottedFunctions,
background_job.BackgroundJob):
_background_process_class = GUIBackgroundProcess
diff --git a/cmk/gui/plugins/wato/background_job.py
b/cmk/gui/plugins/wato/background_job.py
index 744e4b9..b62bebc 100644
--- a/cmk/gui/plugins/wato/background_job.py
+++ b/cmk/gui/plugins/wato/background_job.py
@@ -47,10 +47,6 @@ register_modules(WatoModule(
))
class ModeBackgroundJobsOverview(WatoMode):
- def __init__(self):
- super(ModeBackgroundJobsOverview, self).__init__()
-
-
@classmethod
def name(cls):
return "background_jobs_overview"
@@ -101,10 +97,6 @@ class ModeBackgroundJobDetails(WatoMode):
return []
- def __init__(self):
- super(ModeBackgroundJobDetails, self).__init__()
-
-
def title(self):
return _("Background job details")
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index 055e2bc..9e82021 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -6345,10 +6345,6 @@ class ModeBackupTargets(backup.PageBackupTargets, WatoMode):
return ["backups"]
- def __init__(self):
- super(ModeBackupTargets, self).__init__()
-
-
def title(self):
return _("Site backup targets")
@@ -7501,10 +7497,6 @@ class ModeEditGlobalSetting(EditGlobalSettingMode):
return ["global"]
- def __init__(self):
- super(ModeEditGlobalSetting, self).__init__()
-
-
def title(self):
return _("Global configuration settings for Check_MK")
@@ -7533,10 +7525,6 @@ class ModeEditSiteGlobalSetting(EditGlobalSettingMode):
return ["global"]
- def __init__(self):
- super(ModeEditSiteGlobalSetting, self).__init__()
-
-
def _back_mode(self):
return "edit_site_globals"
@@ -13536,10 +13524,6 @@ class ModeCloneRule(EditRuleMode):
return []
- def __init__(self):
- super(ModeCloneRule, self).__init__()
-
-
def _set_rule(self):
super(ModeCloneRule, self)._set_rule()
@@ -14620,10 +14604,6 @@ def custom_attr_types():
class ModeEditCustomAttr(WatoMode):
__metaclass__ = abc.ABCMeta
- def __init__(self):
- # Note: the base class calls _from_vars
- super(ModeEditCustomAttr, self).__init__()
-
@property
def _attrs(self):
return self._all_attrs[self._type]
@@ -14979,10 +14959,6 @@ class ModeCustomUserAttrs(ModeCustomAttrs):
def permissions(cls):
return ["users"]
-
- def __init__(self):
- super(ModeCustomUserAttrs, self).__init__()
-
@property
def _type(self):
return 'user'
diff --git a/cmk/gui/wato/pages/sites.py b/cmk/gui/wato/pages/sites.py
index 661d60d..35f08d2 100644
--- a/cmk/gui/wato/pages/sites.py
+++ b/cmk/gui/wato/pages/sites.py
@@ -71,10 +71,6 @@ class ModeDistributedMonitoring(ModeSites):
return ["sites"]
- def __init__(self):
- super(ModeDistributedMonitoring, self).__init__()
-
-
def title(self):
return _("Distributed Monitoring")
diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py
index b0c8f3f..65ffe51 100644
--- a/cmk/gui/watolib.py
+++ b/cmk/gui/watolib.py
@@ -780,9 +780,6 @@ class ConfigDomainOMD(ConfigDomain):
# add, remove mean just modifications in the data structures
class WithPermissions(object):
- def __init__(self):
- super(WithPermissions, self).__init__()
-
def may(self, how): # how is "read" or "write"
return self.user_may(config.user.id, how)
diff --git a/tests/pylint/pylintrc b/tests/pylint/pylintrc
index 7100c29..16be16c 100644
--- a/tests/pylint/pylintrc
+++ b/tests/pylint/pylintrc
@@ -77,10 +77,6 @@ disable=
wrong-import-order,
wrong-import-position,
#---------------------------------------------------------------------------
- # The warning below has already been fixed for non-web/ code. When the
- # upcoming reorganization of web/ has been landed, this should be fixed first.
- useless-super-delegation,
- #---------------------------------------------------------------------------
# Enabling the two spelling-related checks increases pylints runtime from
# 11 min to 40 min, so we better keep those disabled for normal runs.
# wrong-spelling-in-comment,