fix pep8 error

with pylint >= 2.13.8 pep8 check fails with following error:
neutron_lib/api/extensions.py:266:8: E1124: Argument 'extension_attrs_map'
passed by position and keyword in method call (redundant-keyword-arg)

for more detail: [1] [2]

[1] https://zuul.opendev.org/t/openstack/build/caa4cd429225408bad491c71c6525a6f
[2] https://zuul.opendev.org/t/openstack/build/1da3742f85e34614ac38f9d4fdbc7f01

Change-Id: Icf6c7095acbea0b967a0b2304e0a9a3f61fb9a9b
This commit is contained in:
zhouhenglc
2022-05-06 14:12:03 +08:00
parent daaa1e79b5
commit d2b395f8dc

View File

@@ -128,7 +128,8 @@ class ExtensionDescriptor(object, metaclass=abc.ABCMeta):
"""
return []
def update_attributes_map(self, extended_attributes,
@classmethod
def update_attributes_map(cls, extended_attributes,
extension_attrs_map=None):
"""Update attributes map for this extension.
@@ -263,5 +264,5 @@ class APIExtensionDescriptor(ExtensionDescriptor):
"""
if extension_attrs_map is None:
extension_attrs_map = cls.get_extended_resources('2.0')
super(APIExtensionDescriptor, cls).update_attributes_map(
cls, extended_attributes, extension_attrs_map=extension_attrs_map)
super().update_attributes_map(
extended_attributes, extension_attrs_map=extension_attrs_map)