mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
pylint: Fix arguments-renamed
Pylint 2.9.0 introduced new checker which was a subset of arguments-differ: > Used when a method parameter has a different name than in the implemented interface or in an overridden method. Fixes: https://pagure.io/freeipa/issue/9117 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
committed by
Rob Crittenden
parent
8383e60b2f
commit
baf68ef37c
@@ -822,10 +822,10 @@ class API(ReadOnly):
|
||||
|
||||
|
||||
class IPAHelpFormatter(optparse.IndentedHelpFormatter):
|
||||
def format_epilog(self, text):
|
||||
def format_epilog(self, epilog):
|
||||
text_width = self.width - self.current_indent
|
||||
indent = " " * self.current_indent
|
||||
lines = text.splitlines()
|
||||
lines = epilog.splitlines()
|
||||
result = '\n'.join(
|
||||
textwrap.fill(line, text_width, initial_indent=indent,
|
||||
subsequent_indent=indent)
|
||||
|
||||
@@ -513,14 +513,14 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
"""Tell systemd to reload config files"""
|
||||
ipautil.run([paths.SYSTEMCTL, "--system", "daemon-reload"])
|
||||
|
||||
def configure_http_gssproxy_conf(self, ipaapi_user):
|
||||
def configure_http_gssproxy_conf(self, ipauser):
|
||||
ipautil.copy_template_file(
|
||||
os.path.join(paths.USR_SHARE_IPA_DIR, 'gssproxy.conf.template'),
|
||||
paths.GSSPROXY_CONF,
|
||||
dict(
|
||||
HTTP_KEYTAB=paths.HTTP_KEYTAB,
|
||||
HTTPD_USER=constants.HTTPD_USER,
|
||||
IPAAPI_USER=ipaapi_user,
|
||||
IPAAPI_USER=ipauser,
|
||||
SWEEPER_SOCKET=paths.IPA_CCACHE_SWEEPER_GSSPROXY_SOCK,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -131,7 +131,9 @@ class ConfigureTool(admintool.AdminTool):
|
||||
raise NotImplementedError
|
||||
|
||||
@classmethod
|
||||
def add_options(cls, parser, positional=False):
|
||||
def add_options( # pylint: disable=arguments-renamed
|
||||
cls, parser, positional=False
|
||||
):
|
||||
transformed_cls = cls._transform(cls.configurable_class)
|
||||
|
||||
if issubclass(transformed_cls, common.Interactive):
|
||||
|
||||
@@ -76,46 +76,46 @@ class KeySyncer(SyncReplConsumer):
|
||||
return False
|
||||
return vals[0].startswith(b'dnssec-replica:')
|
||||
|
||||
def application_add(self, uuid, dn, newattrs):
|
||||
objclass = self._get_objclass(newattrs)
|
||||
def application_add(self, uuid, dn, attributes):
|
||||
objclass = self._get_objclass(attributes)
|
||||
if objclass == b'idnszone':
|
||||
self.zone_add(uuid, dn, newattrs)
|
||||
self.zone_add(uuid, dn, attributes)
|
||||
elif objclass == b'idnsseckey':
|
||||
self.key_meta_add(uuid, dn, newattrs)
|
||||
self.key_meta_add(uuid, dn, attributes)
|
||||
elif objclass == b'ipk11publickey' and \
|
||||
self.__is_replica_pubkey(newattrs):
|
||||
self.__is_replica_pubkey(attributes):
|
||||
self.hsm_master_sync()
|
||||
|
||||
def application_del(self, uuid, dn, oldattrs):
|
||||
objclass = self._get_objclass(oldattrs)
|
||||
def application_del(self, uuid, dn, previous_attributes):
|
||||
objclass = self._get_objclass(previous_attributes)
|
||||
if objclass == b'idnszone':
|
||||
self.zone_del(uuid, dn, oldattrs)
|
||||
self.zone_del(uuid, dn, previous_attributes)
|
||||
elif objclass == b'idnsseckey':
|
||||
self.key_meta_del(uuid, dn, oldattrs)
|
||||
self.key_meta_del(uuid, dn, previous_attributes)
|
||||
elif objclass == b'ipk11publickey' and \
|
||||
self.__is_replica_pubkey(oldattrs):
|
||||
self.__is_replica_pubkey(previous_attributes):
|
||||
self.hsm_master_sync()
|
||||
|
||||
def application_sync(self, uuid, dn, newattrs, oldattrs):
|
||||
objclass = self._get_objclass(oldattrs)
|
||||
def application_sync(self, uuid, dn, attributes, previous_attributes):
|
||||
objclass = self._get_objclass(previous_attributes)
|
||||
if objclass == b'idnszone':
|
||||
olddn = ldap.dn.str2dn(oldattrs['dn'])
|
||||
newdn = ldap.dn.str2dn(newattrs['dn'])
|
||||
olddn = ldap.dn.str2dn(previous_attributes['dn'])
|
||||
newdn = ldap.dn.str2dn(attributes['dn'])
|
||||
assert olddn == newdn, 'modrdn operation is not supported'
|
||||
|
||||
oldval = self.__get_signing_attr(oldattrs)
|
||||
newval = self.__get_signing_attr(newattrs)
|
||||
oldval = self.__get_signing_attr(previous_attributes)
|
||||
newval = self.__get_signing_attr(attributes)
|
||||
if oldval != newval:
|
||||
if self.__is_dnssec_enabled(newattrs):
|
||||
self.zone_add(uuid, olddn, newattrs)
|
||||
if self.__is_dnssec_enabled(attributes):
|
||||
self.zone_add(uuid, olddn, attributes)
|
||||
else:
|
||||
self.zone_del(uuid, olddn, oldattrs)
|
||||
self.zone_del(uuid, olddn, previous_attributes)
|
||||
|
||||
elif objclass == b'idnsseckey':
|
||||
self.key_metadata_sync(uuid, dn, oldattrs, newattrs)
|
||||
self.key_metadata_sync(uuid, dn, previous_attributes, attributes)
|
||||
|
||||
elif objclass == b'ipk11publickey' and \
|
||||
self.__is_replica_pubkey(newattrs):
|
||||
self.__is_replica_pubkey(attributes):
|
||||
self.hsm_master_sync()
|
||||
|
||||
def syncrepl_refreshdone(self):
|
||||
|
||||
@@ -48,8 +48,8 @@ class SyncReplConsumer(ReconnectLDAPObject, SyncreplConsumer):
|
||||
logger.debug('New cookie is: %s', cookie)
|
||||
self.__data['cookie'] = cookie
|
||||
|
||||
def syncrepl_entry(self, dn, attributes, uuid):
|
||||
attributes = cidict(attributes)
|
||||
def syncrepl_entry(self, dn, attrs, uuid):
|
||||
attributes = cidict(attrs)
|
||||
# First we determine the type of change we have here
|
||||
# (and store away the previous data for later if needed)
|
||||
previous_attributes = cidict()
|
||||
|
||||
@@ -52,7 +52,7 @@ class IPASubids(AdminTool):
|
||||
help="Dry run mode.",
|
||||
)
|
||||
|
||||
def validate_options(self, neends_root=False):
|
||||
def validate_options(self, needs_root=False):
|
||||
super().validate_options(needs_root=True)
|
||||
opt = self.safe_options
|
||||
|
||||
|
||||
@@ -214,10 +214,10 @@ class command(metaobject):
|
||||
),
|
||||
)
|
||||
|
||||
def _iter_params(self, cmd):
|
||||
for arg in cmd.args():
|
||||
def _iter_params(self, metaobj):
|
||||
for arg in metaobj.args():
|
||||
yield arg
|
||||
for option in cmd.options():
|
||||
for option in metaobj.options():
|
||||
if option.name == 'version':
|
||||
continue
|
||||
yield option
|
||||
@@ -412,8 +412,8 @@ class topic_(MetaObject):
|
||||
else:
|
||||
topic.pop('topic_topic', None)
|
||||
|
||||
def _get_obj(self, topic, **kwargs):
|
||||
return topic
|
||||
def _get_obj(self, obj, **kwargs):
|
||||
return obj
|
||||
|
||||
def _retrieve(self, full_name, **kwargs):
|
||||
self.__make_topics()
|
||||
@@ -564,8 +564,8 @@ class param(BaseParam):
|
||||
def parent(self):
|
||||
return self.api.Object.metaobject
|
||||
|
||||
def _get_obj(self, metaobj_param, **kwargs):
|
||||
metaobj, param = metaobj_param
|
||||
def _get_obj(self, obj, **kwargs):
|
||||
metaobj, param = obj
|
||||
|
||||
obj = dict()
|
||||
obj['name'] = unicode(param.name)
|
||||
@@ -693,8 +693,8 @@ class output(BaseParam):
|
||||
def parent(self):
|
||||
return self.api.Object.command
|
||||
|
||||
def _get_obj(self, cmd_output, **kwargs):
|
||||
cmd, output = cmd_output
|
||||
def _get_obj(self, obj, **kwargs):
|
||||
cmd, output = obj
|
||||
required = True
|
||||
multivalue = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user