Use newer flake8 on python3.8 zuul systems

flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

Suppresses the following:
 W503 line break before binary operator
 W504 line break after binary operator
 W605 invalid escape sequence '\d'

 E117 over-indented
 E266 too many leading '#' for block comment
 E305 expected 2 blank lines after class or function definition, found 1
 E402 module level import not at top of file
 E722 do not use bare 'except'
 E741 ambiguous variable name 'I'

 F632 use ==/!= to compare constant literals
 F821 undefined name 'dpdk' (this is a flake8 bug)

Change-Id: I6c2ef05d765b57b7be0b038d6e384cb2af589054
Partial-Bug: 1895054
Signed-off-by: albailey <Al.Bailey@windriver.com>
This commit is contained in:
albailey 2020-11-05 14:56:47 -06:00
parent 8ef034919c
commit ee7ae99d41
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# hacking pulls in flake8
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
hacking
bashate >= 0.2
bandit!=1.6.0,>=1.1.0,<2.0.0

14
tox.ini
View File

@ -36,13 +36,25 @@ commands =
# F401 'FOO' imported but unused
# F841 local variable 'foo' is assigned to but never used
# W291 trailing whitespace
# W503 line break before binary operator
# W504 line break after binary operator
# W605 invalid escape sequence '\d'
# E117 over-indented
# E265 block comment should start with '# '
# E266 too many leading '#' for block comment
# E305 expected 2 blank lines after class or function definition, found 1
# E402 module level import not at top of file
# E722 do not use bare 'except'
# E741 ambiguous variable name 'I'
# F632 use ==/!= to compare constant literals (str, bytes, int, float, tuple)
# F821 undefined name 'dpdk' (this is a flake8 bug)
# H101 is TODO
# H104 File contains nothing but comments
# H201 no 'except:' at least use 'except Exception:'
# H238 old style class declaration, use new style (inherit from `object`)
# H306 imports not in alphabetical order (sys, re)
ignore=F401,F841,W291,E265,H101,H104,H201,H238,H306
ignore=F401,F632,F821,F841,W291,W503,W504,W605,E117,E265,E266,E305,E402,E722,E741,
H101,H104,H201,H238,H306
max-line-length=110
[testenv:flake8]