Enable pylint useless-super-delegation check

Change code to remove unneeded super() calls.

In the case of the MaintenanceWorker class, the parent
classes never implement anything for stop() or wait()
so we can safely use 'pass'. They must exist since the
oslo.service class defines them as abtract methods.

TrivialFix

Change-Id: Ic8b184f077b6647c735e01cf89211f1fc613cb85
This commit is contained in:
Brian Haley 2024-11-04 13:14:04 -05:00
parent 98247364f2
commit 822edc31c8
4 changed files with 2 additions and 12 deletions

View File

@ -47,7 +47,6 @@ disable=
unused-argument,
unused-import,
unused-variable,
useless-super-delegation,
unnecessary-pass,
raise-missing-from,
arguments-renamed,

View File

@ -103,9 +103,6 @@ def _add_gateway_chassis(api, txn, lrp_name, val):
class CheckLivenessCommand(command.BaseCommand):
def __init__(self, api):
super().__init__(api)
def run_idl(self, txn):
# txn.pre_commit responsible for updating nb_global.nb_cfg, but
# python-ovs will not update nb_cfg if no other changes are made

View File

@ -234,9 +234,6 @@ def get_ovn_idls(driver, trigger):
class OvsdbNbOvnIdl(nb_impl_idl.OvnNbApiIdlImpl, Backend):
def __init__(self, connection):
super().__init__(connection)
@n_utils.classproperty
def connection_string(cls):
return cfg.get_ovn_nb_connection()
@ -913,9 +910,6 @@ class OvsdbNbOvnIdl(nb_impl_idl.OvnNbApiIdlImpl, Backend):
class OvsdbSbOvnIdl(sb_impl_idl.OvnSbApiIdlImpl, Backend):
def __init__(self, connection):
super().__init__(connection)
@n_utils.classproperty
def connection_string(cls):
return cfg.get_ovn_sb_connection()

View File

@ -31,11 +31,11 @@ class MaintenanceWorker(worker.BaseWorker):
def stop(self):
"""Stop service."""
super().stop()
pass
def wait(self):
"""Wait for service to complete."""
super().wait()
pass
@staticmethod
def reset():