Fix pep8 errors with pytlint v2.16.0

Change-Id: I2a44e3843dd25b9db387c12f536a084d1fafbcd1
Closes-Bug: #2004538
(cherry picked from commit b1a4f783da)
This commit is contained in:
Rodolfo Alonso Hernandez 2023-02-02 10:34:44 +01:00
parent acfb2fdc29
commit 025e0d72ee
2 changed files with 6 additions and 6 deletions

View File

@ -232,7 +232,7 @@ class AttributeInfo(object):
res = validator(res_dict[attr],
attr_vals['validate'][rule])
if res:
msg_dict = dict(attr=attr, reason=res)
msg_dict = {'attr': attr, 'reason': res}
msg = _("Invalid input for %(attr)s. "
"Reason: %(reason)s.") % msg_dict
raise exc_cls(msg)

View File

@ -213,9 +213,9 @@ def _resource_model_map_helper(rs_map, resource, subclass):
raise RuntimeError(_("Model %(sub)s tried to register for API "
"resource %(res)s which conflicts with model "
"%(other)s.") %
dict(sub=subclass,
other=rs_map[resource],
res=resource))
{'sub': subclass,
'other': rs_map[resource],
'res': resource})
rs_map[resource] = subclass
@ -241,8 +241,8 @@ def get_tag_resource_parent_map():
if collection in parent_map:
msg = (_("API parent %(collection)s/%(resource)s for "
"model %(subclass)s is already registered.") %
dict(collection=collection, resource=resource,
subclass=subclass))
{'collection': collection, 'resource': resource,
'subclass': subclass})
raise RuntimeError(msg)
parent_map[collection] = resource
return parent_map