Use newer flake8 to run on ubuntu-focal Zuul
flake8 2.6.2 failed on ubuntu-focal zuul machines running python3.8 with the following error: AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT' pylint failed with following error: ERROR: InvocationError for command /home/zuul/src/opendev.org/starlingx/test/.tox/pylint/bin/pylint --rcfile=pylint.rc automated-p upgrade openstackdocstheme to 2.2.1 and update sphinx version fix releasenotes to use python3 Change-Id: Ie5e11b44a3ff9695a6ec44eaf4a53baababc27ac Signed-off-by: Yvonne Ding <yvonne.ding@windriver.com>
This commit is contained in:
parent
32e8a73529
commit
d1e88a989e
|
@ -4,12 +4,16 @@
|
||||||
- build-openstack-docs-pti
|
- build-openstack-docs-pti
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- build-openstack-releasenotes
|
- build-openstack-releasenotes:
|
||||||
|
vars:
|
||||||
|
sphinx_python: python3
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
- openstack-tox-pylint
|
- openstack-tox-pylint
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- build-openstack-releasenotes
|
- build-openstack-releasenotes:
|
||||||
|
vars:
|
||||||
|
sphinx_python: python3
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
- openstack-tox-pylint
|
- openstack-tox-pylint
|
||||||
post:
|
post:
|
||||||
|
|
|
@ -744,7 +744,7 @@ def ssh_to_remote_node(host, username=None, password=None, prompt=None,
|
||||||
|
|
||||||
Examples: with ssh_to_remote_node('128.224.150.92) as remote_ssh:
|
Examples: with ssh_to_remote_node('128.224.150.92) as remote_ssh:
|
||||||
remote_ssh.exec_cmd(cmd)
|
remote_ssh.exec_cmd(cmd)
|
||||||
\ """
|
"""
|
||||||
|
|
||||||
if not host:
|
if not host:
|
||||||
raise exceptions.SSHException(
|
raise exceptions.SSHException(
|
||||||
|
|
|
@ -183,7 +183,7 @@ def get_resources(field='NAME', namespace=None, all_namespaces=None,
|
||||||
all_namespaces (bool|None): used only when namespace is unspecified
|
all_namespaces (bool|None): used only when namespace is unspecified
|
||||||
resource_names (str|None|list|tuple): e.g., calico-typha
|
resource_names (str|None|list|tuple): e.g., calico-typha
|
||||||
resource_type (str): e.g., "deployments.apps", "pod", "service"
|
resource_type (str): e.g., "deployments.apps", "pod", "service"
|
||||||
labels (dict|str\list|tuple): Used only when resource_names are
|
labels (dict|str|list|tuple): Used only when resource_names are
|
||||||
unspecified
|
unspecified
|
||||||
field_selectors (dict|str|list|tuple): Used only when resource_names
|
field_selectors (dict|str|list|tuple): Used only when resource_names
|
||||||
are unspecified
|
are unspecified
|
||||||
|
|
|
@ -1958,7 +1958,7 @@ def enable_service(service_name, con_ssh=None,
|
||||||
if res == 1:
|
if res == 1:
|
||||||
return 1, output
|
return 1, output
|
||||||
|
|
||||||
msg = "Service enabled: {]".format(service_name)
|
msg = "Service enabled: {}".format(service_name)
|
||||||
LOG.info(msg)
|
LOG.info(msg)
|
||||||
return 0, msg
|
return 0, msg
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Documentation Sphinx
|
# Documentation Sphinx
|
||||||
sphinx>=1.8.2 # BSD
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
openstackdocstheme>=1.26.0 # Apache-2.0
|
openstackdocstheme>=2.2.1 # Apache-2.0
|
||||||
|
|
||||||
# Documentation Release Notes
|
# Documentation Release Notes
|
||||||
reno>=0.1.1
|
reno>=3.1.0
|
||||||
|
|
|
@ -52,6 +52,7 @@ load-plugins=
|
||||||
# W0702 bare-except
|
# W0702 bare-except
|
||||||
# W0703 broad except warning
|
# W0703 broad except warning
|
||||||
# W0706 try-except-raise
|
# W0706 try-except-raise
|
||||||
|
# W0707 raise-missing-from
|
||||||
# W1113 keyword-arg-before-vararg
|
# W1113 keyword-arg-before-vararg
|
||||||
# W1302 bad-format-string
|
# W1302 bad-format-string
|
||||||
# W1308 duplicate-string-formatting-argument
|
# W1308 duplicate-string-formatting-argument
|
||||||
|
@ -71,7 +72,7 @@ disable=C,R,
|
||||||
W0401,W0402,W0404,
|
W0401,W0402,W0404,
|
||||||
W0511,
|
W0511,
|
||||||
W0601,W0603,W0611,W0612,W0613,W0621,W0622,W0632,
|
W0601,W0603,W0611,W0612,W0613,W0621,W0622,W0632,
|
||||||
W0702,W0703,W0706,
|
W0702,W0703,W0706,W0707,
|
||||||
W1113,W1302,W1308,W1401,
|
W1113,W1302,W1308,W1401,
|
||||||
E0102,E0401,E0611,E0711,E1102,E1120,E1136,E1305
|
E0102,E0401,E0611,E0711,E1102,E1120,E1136,E1305
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
hacking>=1.1.0,<1.2.0 # Apache-2.0
|
hacking
|
||||||
pylint
|
pylint
|
||||||
PyYAML>=3.1.0
|
PyYAML>=3.1.0
|
||||||
yamllint>=0.5.2
|
yamllint>=0.5.2
|
||||||
|
|
13
tox.ini
13
tox.ini
|
@ -36,6 +36,7 @@ commands = pylint --rcfile=pylint.rc automated-pytest-suite automated-robot-suit
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
deps = flake8<3.8.3
|
||||||
commands = flake8 {posargs}
|
commands = flake8 {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
@ -57,6 +58,8 @@ commands = flake8 {posargs}
|
||||||
# W292 no newline at end of file
|
# W292 no newline at end of file
|
||||||
# W391 blank line at end of file
|
# W391 blank line at end of file
|
||||||
# W503 line break before binary operator
|
# W503 line break before binary operator
|
||||||
|
# W504 line break after binary operator
|
||||||
|
# W605 Invalid escape sequence 'x'
|
||||||
#
|
#
|
||||||
# E121 continuation line under-indented for hanging indent
|
# E121 continuation line under-indented for hanging indent
|
||||||
# E123 closing bracket does not match indentation of opening bracket's line
|
# E123 closing bracket does not match indentation of opening bracket's line
|
||||||
|
@ -69,18 +72,22 @@ commands = flake8 {posargs}
|
||||||
# E302 expected 2 blank lines, found 1
|
# E302 expected 2 blank lines, found 1
|
||||||
# E303 too many blank lines
|
# E303 too many blank lines
|
||||||
# E713 test for membership should be 'not in'
|
# E713 test for membership should be 'not in'
|
||||||
|
# E722 do not use bare except'
|
||||||
# E731 do not assign a lambda expression, use a def
|
# E731 do not assign a lambda expression, use a def
|
||||||
|
|
||||||
#
|
#
|
||||||
# F401 'X' imported but unused
|
# F401 'X' imported but unused
|
||||||
# F403 ‘from module import *’ used; unable to detect undefined names
|
# F403 ‘from module import *’ used; unable to detect undefined names
|
||||||
|
# F523 unused positional arguments
|
||||||
|
# F632 use ==/!= to compare str, bytes, and int literals
|
||||||
# F811 redefinition of unused 'X' from line 'Y'
|
# F811 redefinition of unused 'X' from line 'Y'
|
||||||
# F841 local variable 'X' is assigned to but never used
|
# F841 local variable 'X' is assigned to but never used
|
||||||
|
# F901 raise NotImplemented should be raise NotImplementedError
|
||||||
#
|
#
|
||||||
ignore = H101,H104,H201,H238,H301,H306,H401,H403,H404,H405,H903,
|
ignore = H101,H104,H201,H238,H301,H306,H401,H403,H404,H405,H903,
|
||||||
W291,W292,W391,W503,
|
W291,W292,W391,W503,W504,W605
|
||||||
E121,E123,E126,E127,E128,E226,E261,E241,E302,E303,E713,E731,
|
E121,E123,E126,E127,E128,E226,E261,E241,E302,E303,E713,E722,E731,
|
||||||
F401,F403,F811,F841
|
F401,F403,F523,F632,F811,F841,F901
|
||||||
show-source = True
|
show-source = True
|
||||||
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasenotes
|
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build,doc/source/conf.py,releasenotes
|
||||||
# Default max-line-length is 80. This should be reduced as the files are cleaned up.
|
# Default max-line-length is 80. This should be reduced as the files are cleaned up.
|
||||||
|
|
Loading…
Reference in New Issue