Fix up nfv tox targets for python3

basepython for tox.ini in nfv is not specified
so it varies when running on different zuul machines.

This fixes bandit (which is not enabled in zuul) to use
alternative path declaration for excluded folders.
See: https://github.com/PyCQA/bandit/issues/400

This fixes pylint when run in python3 since the
suppression syntax is different in both versions
(pylint: disable) vs (pylint disable)
https://github.com/PyCQA/pylint/issues/986

This fixes a stricter check that was introduced by
pylint 2.4.3 (released Oct 19, 2019) related to
abs.abstractproperty
https://github.com/PyCQA/pylint/issues/3150

Change-Id: I3718229d6d0e6074cf10347e6c6cb40fb26c25db
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2019-10-30 10:50:25 -05:00
parent 2dab6f07f2
commit 8993a6a099
3 changed files with 8 additions and 6 deletions

View File

@ -40,28 +40,28 @@ class NFVISwMgmtAPI(object):
""" """
pass pass
@abc.abstractproperty @abc.abstractmethod
def query_updates(self, future, callback): def query_updates(self, future, callback):
""" """
Query software updates using the plugin Query software updates using the plugin
""" """
pass pass
@abc.abstractproperty @abc.abstractmethod
def query_hosts(self, future, callback): def query_hosts(self, future, callback):
""" """
Query hosts using the plugin Query hosts using the plugin
""" """
pass pass
@abc.abstractproperty @abc.abstractmethod
def update_host(self, future, host_name, callback): def update_host(self, future, host_name, callback):
""" """
Apply a software update to a host using the plugin Apply a software update to a host using the plugin
""" """
pass pass
@abc.abstractproperty @abc.abstractmethod
def update_hosts(self, future, host_names, callback): def update_hosts(self, future, host_names, callback):
""" """
Apply a software update to a list of hosts using the plugin Apply a software update to a list of hosts using the plugin

View File

@ -46,7 +46,8 @@ load-plugins=
# W0706: The except handler raises immediately (try-except-raise) # W0706: The except handler raises immediately (try-except-raise)
# W1401 anomalous-backslash-in-string # W1401 anomalous-backslash-in-string
# W1505: Using deprecated method getargspec() (deprecated-method) # W1505: Using deprecated method getargspec() (deprecated-method)
disable=C, R, W0120, W0125, W0212, W0221, W0223, W0231, W0235, # E0012: pylint for python3 does not support inline deprecation
disable=C, R, E0012, W0120, W0125, W0212, W0221, W0223, W0231, W0235,
W0401, W0404, W0511, W0603, W0612, W0613, W0621, W0622, W0703, W1401, W0401, W0404, W0511, W0603, W0612, W0613, W0621, W0622, W0703, W1401,
W0107, W0706, W1505 W0107, W0706, W1505

View File

@ -114,7 +114,8 @@ commands = pylint {[nfv]nfv_client_src_dir} \
# B310: Audit url open for permitted schemes # B310: Audit url open for permitted schemes
# B506: Test for use of yaml load # B506: Test for use of yaml load
skips = B104,B108,B110,B310,B506 skips = B104,B108,B110,B310,B506
exclude = nfv-docs,nfv-tests,nfv-debug-tools,unit_test exclude = ./nfv-docs,./nfv-tests,./nfv-debug-tools,unit_test
[testenv:bandit] [testenv:bandit]
deps = {[nfv]deps} deps = {[nfv]deps}