Fix pep8 errors with pytlint v2.16.0
Change-Id: I2a44e3843dd25b9db387c12f536a084d1fafbcd1
Closes-Bug: #2004538
(cherry picked from commit b1a4f783da
)
This commit is contained in:
parent
acfb2fdc29
commit
025e0d72ee
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user