Remove self.__dict__ for formatting strings
Following OpenStack Style Guidelines: http://docs.openstack.org/developer/hacking/#dictionaries-lists It is not clear as using explicit dictionaries and help avoid some errors during refactoring. Change-Id: If29fa568b757e8e08ec2bd8986d08e422db9eee4
This commit is contained in:
parent
29099bbc68
commit
74ea43450b
@ -116,7 +116,12 @@ class LintOutput(object):
|
||||
|
||||
def review_str(self):
|
||||
return ("File %(filename)s\nLine %(lineno)d:%(line_content)s\n"
|
||||
"%(code)s: %(message)s" % self.__dict__) # noqa
|
||||
"%(code)s: %(message)s" %
|
||||
{'filename': self.filename,
|
||||
'lineno': self.lineno,
|
||||
'line_content': self.line_content,
|
||||
'code': self.code,
|
||||
'message': self.message})
|
||||
|
||||
|
||||
class ErrorKeys(object):
|
||||
|
Loading…
x
Reference in New Issue
Block a user