fix pep8 job
Update the cap on flake8 to support newer versions that work with python3. Update tox settings for pep8 environment to use python 3. Ignore the error caused by not having 2 blank lines before functions and classes. Fix 2 syntax errors in function definitions. Change-Id: I4da79ceefcbf1c23d217716f7b25ac6a092794ff Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
7330b1c6ee
commit
ac47c5fc58
|
@ -497,7 +497,7 @@ class Code(object):
|
|||
|
||||
stack_size = property(get_stack_size, set_stack_size)
|
||||
|
||||
def stackchange(self, (inputs, outputs)):
|
||||
def stackchange(self, inputs, outputs):
|
||||
if self._ss is None:
|
||||
raise AssertionError("Unknown stack size at this location")
|
||||
self.stack_size -= inputs # check underflow
|
||||
|
|
|
@ -561,7 +561,7 @@ class Connection(ASTNode):
|
|||
|
||||
def __str__(self):
|
||||
res = "Connection<"
|
||||
res += " {} ".format(map(lambda (x, y): (str(x), str(y)),
|
||||
res += " {} ".format(map(lambda x, y: (str(x), str(y)),
|
||||
self.connections))
|
||||
res += ">"
|
||||
return res
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# mock object framework
|
||||
coverage>=3.6 # Apache-2.0
|
||||
hacking>=0.10.2
|
||||
flake8>=2.5.4,<2.6.0 # MIT
|
||||
flake8>=2.5.4,<=3.5.0 # MIT
|
||||
nose==1.3.0
|
||||
mock>=1.0.1
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -29,6 +29,7 @@ setenv = VIRTUAL_ENV={envdir}
|
|||
PYTHONPATH={homedir}/spark/spark-1.6.1/python:{homedir}/spark/spark-1.6.1/python/lib/py4j-0.9-src.zip:
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands =
|
||||
flake8 monasca_analytics test
|
||||
|
||||
|
@ -41,7 +42,7 @@ install_command = pip install -U {opts} {packages}
|
|||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = F821,H201,H404,H405
|
||||
ignore = F821,H201,H404,H405,E305
|
||||
max-complexity = 50
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build
|
||||
|
|
Loading…
Reference in New Issue