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: Iac567648435cd83c3d3fafc1a3e69ea75f2b1624
This commit is contained in:
parent
ee0e9d166e
commit
261654b059
@ -113,7 +113,12 @@ class LintOutput(object):
|
|||||||
|
|
||||||
def review_str(self):
|
def review_str(self):
|
||||||
return ("File %(filename)s\nLine %(lineno)d:%(line_content)s\n"
|
return ("File %(filename)s\nLine %(lineno)d:%(line_content)s\n"
|
||||||
"%(code)s: %(message)s" % self.__dict__) # noqa:H501
|
"%(code)s: %(message)s" %
|
||||||
|
{'filename': self.filename,
|
||||||
|
'lineno': self.lineno,
|
||||||
|
'line_content': self.line_content,
|
||||||
|
'code': self.code,
|
||||||
|
'message': self.message})
|
||||||
|
|
||||||
|
|
||||||
class ErrorKeys(object):
|
class ErrorKeys(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user