Fix zuul jobs broken due to pip upversion

The bandit defined in base level test-requirements.txt
needed to be restricted to python3.

The version of hacking was conflicting.
Updated pylint to be python3.
The newer hacking pulls in some additional flake8 warnings
which are being suppressed for now.

The gettextutils has per line suppressions based
on the new version of pylint, however that file should be
removed in favor of a solution based on oslo.i18n.

The multiple test-requirements.txt files should be
revisited.

Change-Id: I9de0ad5871865fc3baf79f89e3f9f6bedc523e05
Partial-Bug: #1907678
Signed-off-by: albailey <Al.Bailey@windriver.com>
This commit is contained in:
albailey 2020-12-18 13:18:59 -06:00
parent 33d8e1f8d5
commit bb96242adf
5 changed files with 17 additions and 11 deletions

View File

@ -195,7 +195,7 @@ def install(domain, lazy=False):
gettext.install(domain, gettext.install(domain,
localedir=os.environ.get(localedir)) localedir=os.environ.get(localedir))
else: else:
gettext.install(domain, gettext.install(domain, # pylint: disable=unexpected-keyword-arg
localedir=os.environ.get(localedir), localedir=os.environ.get(localedir),
unicode=True) unicode=True)
@ -208,7 +208,7 @@ class Message(six.text_type):
and can be treated as such. and can be treated as such.
""" """
def __new__(cls, msgid, msgtext=None, params=None, def __new__(cls, msgid, msgtext=None, params=None, # pylint: disable=keyword-arg-before-vararg
domain='dcmanagerclient', *args): domain='dcmanagerclient', *args):
"""Create a new Message object. """Create a new Message object.

View File

@ -37,6 +37,7 @@ load-plugins=
# R detect Refactor for a "good practice" metric violation # R detect Refactor for a "good practice" metric violation
# C detect Convention for coding standard violation # C detect Convention for coding standard violation
# W0102: dangerous-default-value # W0102: dangerous-default-value
# W0107: unnecessary-pass
# W0201: attribute-defined-outside-init # W0201: attribute-defined-outside-init
# W0212: protected-access # W0212: protected-access
# W0231: super-init-not-called # W0231: super-init-not-called
@ -47,12 +48,13 @@ load-plugins=
# W0621: redefined-outer-name # W0621: redefined-outer-name
# W0622: redefined-builtin # W0622: redefined-builtin
# W0703: broad-except # W0703: broad-except
# W1201: logging-not-lazy
# W1113: keyword-arg-before-vararg # W1113: keyword-arg-before-vararg
# W1201: logging-not-lazy
# W1505: deprecated-method
# E1102: not-callable # E1102: not-callable
disable=fixme,C,R, disable=fixme,C,R,
W0102,W0201,W0212,W0231,W0403, W0102,W0107,W0201,W0212,W0231,W0403,
W0612,W0613,W0603,W0621,W0622,W0703,W1201,W1113, W0612,W0613,W0603,W0621,W0622,W0703,W1112,W1201,W1505,
E1102 E1102
[REPORTS] [REPORTS]

View File

@ -1,9 +1,10 @@
# The order of packages is significant, because pip processes them in the order # The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 hacking>=1.1.0,<=2.0.0 # Apache-2.0
pylint==1.9.2;python_version<"3.0" # GPLv2 isort<5;python_version>="3.0"
pylint==2.3.1;python_version>="3.0" # GPLv2 pylint<2.1.0;python_version<"3.0" # GPLv2
pylint<2.3.0;python_version>="3.0" # GPLv2
python-openstackclient>=3.3.0 # Apache-2.0 python-openstackclient>=3.3.0 # Apache-2.0
sphinx>=1.5.1 # BSD sphinx>=1.5.1 # BSD
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD

View File

@ -43,7 +43,7 @@ basepython = python3
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:pylint] [testenv:pylint]
basepython = python2.7 basepython = python3
sitepackages = False sitepackages = False
deps = {[testenv]deps} deps = {[testenv]deps}
commands = commands =
@ -75,8 +75,10 @@ commands = oslo_debug_helper {posargs}
[flake8] [flake8]
# E123, E125 skipped as they are invalid PEP-8. # E123, E125 skipped as they are invalid PEP-8.
# W504 line break after binary operator
# W605 invalid escape sequence
show-source = True show-source = True
ignore = E123,E125,H102 ignore = E123,E125,W504,W605,H102
builtins = _ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*openstack/common*,*egg,build exclude=.venv,.git,.tox,dist,doc,*lib/python*,*openstack/common*,*egg,build

View File

@ -1,4 +1,5 @@
PyYAML>=3.1.0 PyYAML>=3.1.0
yamllint>=0.5.2 yamllint>=0.5.2
mock>=2.0 # BSD mock>=2.0 # BSD
bandit!=1.6.0,>=1.1.0,<2.0.0 isort<5;python_version>="3.5"
bandit;python_version>="3.5"