Fix docs jobs and pep8 errors with pylint 2.6.2
Remove test-requirements.txt from docs dependencies, add hacking in doc/requirements. It should reduce the duration of the docs job. Removed some comments that disabled consider-using-with in pylint, most of the flagged code is now considered as false positive. Change-Id: Ib550542820163be2bbef97df7b090834a6b6dccd
This commit is contained in:
parent
b41b275b83
commit
8ac5aa7cbe
|
@ -2,6 +2,7 @@
|
||||||
# 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.
|
||||||
# Docs
|
# Docs
|
||||||
|
hacking>=3.0 # Apache-2.0
|
||||||
os-api-ref>=1.4.0 # Apache-2.0
|
os-api-ref>=1.4.0 # Apache-2.0
|
||||||
sphinxcontrib-actdiag>=0.8.5 # BSD
|
sphinxcontrib-actdiag>=0.8.5 # BSD
|
||||||
sphinxcontrib-apidoc>=0.2.1 # BSD
|
sphinxcontrib-apidoc>=0.2.1 # BSD
|
||||||
|
|
|
@ -40,7 +40,6 @@ class NetworkNamespace(object):
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
# Save the current network namespace
|
# Save the current network namespace
|
||||||
# pylint: disable=consider-using-with
|
|
||||||
self.current_netns_fd = open(self.current_netns, encoding='utf-8')
|
self.current_netns_fd = open(self.current_netns, encoding='utf-8')
|
||||||
with open(self.target_netns, encoding='utf-8') as fd:
|
with open(self.target_netns, encoding='utf-8') as fd:
|
||||||
self.set_netns(fd.fileno(), self.CLONE_NEWNET)
|
self.set_netns(fd.fileno(), self.CLONE_NEWNET)
|
||||||
|
|
|
@ -53,10 +53,8 @@ class UDPStatusGetter(object):
|
||||||
self.sock = None
|
self.sock = None
|
||||||
self.update(self.key, self.ip, self.port)
|
self.update(self.key, self.ip, self.port)
|
||||||
|
|
||||||
# pylint: disable=consider-using-with
|
|
||||||
self.health_executor = futures.ProcessPoolExecutor(
|
self.health_executor = futures.ProcessPoolExecutor(
|
||||||
max_workers=CONF.health_manager.health_update_threads)
|
max_workers=CONF.health_manager.health_update_threads)
|
||||||
# pylint: disable=consider-using-with
|
|
||||||
self.stats_executor = futures.ProcessPoolExecutor(
|
self.stats_executor = futures.ProcessPoolExecutor(
|
||||||
max_workers=CONF.health_manager.stats_update_threads)
|
max_workers=CONF.health_manager.stats_update_threads)
|
||||||
self.health_updater = UpdateHealthDb()
|
self.health_updater = UpdateHealthDb()
|
||||||
|
|
|
@ -57,7 +57,6 @@ class BaseTaskFlowEngine(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# work around for https://bugs.python.org/issue7980
|
# work around for https://bugs.python.org/issue7980
|
||||||
datetime.datetime.strptime('2014-06-19 22:47:16', '%Y-%m-%d %H:%M:%S')
|
datetime.datetime.strptime('2014-06-19 22:47:16', '%Y-%m-%d %H:%M:%S')
|
||||||
# pylint: disable=consider-using-with
|
|
||||||
self.executor = concurrent.futures.ThreadPoolExecutor(
|
self.executor = concurrent.futures.ThreadPoolExecutor(
|
||||||
max_workers=CONF.task_flow.max_workers)
|
max_workers=CONF.task_flow.max_workers)
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,6 @@ class HealthManager(object):
|
||||||
else:
|
else:
|
||||||
self.cw = cw2.ControllerWorker()
|
self.cw = cw2.ControllerWorker()
|
||||||
self.threads = CONF.health_manager.failover_threads
|
self.threads = CONF.health_manager.failover_threads
|
||||||
# pylint: disable=consider-using-with
|
|
||||||
self.executor = futures.ThreadPoolExecutor(max_workers=self.threads)
|
self.executor = futures.ThreadPoolExecutor(max_workers=self.threads)
|
||||||
self.amp_repo = repo.AmphoraRepository()
|
self.amp_repo = repo.AmphoraRepository()
|
||||||
self.amp_health_repo = repo.AmphoraHealthRepository()
|
self.amp_health_repo = repo.AmphoraHealthRepository()
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -94,7 +94,6 @@ allowlist_externals =
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
allowlist_externals = rm
|
allowlist_externals = rm
|
||||||
commands =
|
commands =
|
||||||
|
|
Loading…
Reference in New Issue