Enable pep8 to check files in directory tools
The directory tools is exculed for runing pep8 test now. Enable pep8 to check files in toos/ since there will be more python files. Change-Id: I49b8b90ab8db82033c5a45ee2bcbfbfb7fb77339
This commit is contained in:
parent
eec057d650
commit
e730821c67
|
@ -29,7 +29,7 @@ from six.moves import cStringIO as StringIO
|
|||
|
||||
# enabled checks
|
||||
# http://pylint-messages.wikidot.com/all-codes
|
||||
ENABLED_CODES=(
|
||||
ENABLED_CODES = (
|
||||
# refactor category
|
||||
"R0801", "R0911", "R0912", "R0913", "R0914", "R0915",
|
||||
# warning category
|
||||
|
@ -73,7 +73,7 @@ class LintOutput(object):
|
|||
lineno -= 1
|
||||
while True:
|
||||
line_content = cls._cached_content[lineno].rstrip()
|
||||
lineno +=1
|
||||
lineno += 1
|
||||
if line_content:
|
||||
return line_content
|
||||
|
||||
|
@ -131,8 +131,13 @@ class LintOutput(object):
|
|||
return json.dumps(self.__dict__)
|
||||
|
||||
def review_str(self):
|
||||
kargs = {"filename": self.filename,
|
||||
"lineno": self.lineno,
|
||||
"line_content": self.line_content,
|
||||
"code": self.code,
|
||||
"message": self.message}
|
||||
return ("File %(filename)s\nLine %(lineno)d:%(line_content)s\n"
|
||||
"%(code)s: %(message)s" % self.__dict__)
|
||||
"%(code)s: %(message)s" % kargs)
|
||||
|
||||
|
||||
class ErrorKeys(object):
|
||||
|
@ -156,7 +161,8 @@ class ErrorKeys(object):
|
|||
def run_pylint():
|
||||
buff = StringIO()
|
||||
reporter = text.ParseableTextReporter(output=buff)
|
||||
args = ["-rn", "--disable=all", "--enable=" + ",".join(ENABLED_CODES),"murano"]
|
||||
args = ["-rn", "--disable=all", "--enable=" + ",".join(ENABLED_CODES),
|
||||
"murano"]
|
||||
lint.Run(args, reporter=reporter, exit=False)
|
||||
val = buff.getvalue()
|
||||
buff.close()
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -48,7 +48,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
|||
ignore = H405
|
||||
show-source = true
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg
|
||||
|
||||
[hacking]
|
||||
local-check-factory = murano.hacking.checks.factory
|
||||
|
|
Loading…
Reference in New Issue