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:
Gregory Thiemonge 2021-10-07 18:33:31 +02:00
parent b41b275b83
commit 8ac5aa7cbe
6 changed files with 1 additions and 6 deletions

View File

@ -2,6 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# Docs
hacking>=3.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
sphinxcontrib-actdiag>=0.8.5 # BSD
sphinxcontrib-apidoc>=0.2.1 # BSD

View File

@ -40,7 +40,6 @@ class NetworkNamespace(object):
def __enter__(self):
# Save the current network namespace
# pylint: disable=consider-using-with
self.current_netns_fd = open(self.current_netns, encoding='utf-8')
with open(self.target_netns, encoding='utf-8') as fd:
self.set_netns(fd.fileno(), self.CLONE_NEWNET)

View File

@ -53,10 +53,8 @@ class UDPStatusGetter(object):
self.sock = None
self.update(self.key, self.ip, self.port)
# pylint: disable=consider-using-with
self.health_executor = futures.ProcessPoolExecutor(
max_workers=CONF.health_manager.health_update_threads)
# pylint: disable=consider-using-with
self.stats_executor = futures.ProcessPoolExecutor(
max_workers=CONF.health_manager.stats_update_threads)
self.health_updater = UpdateHealthDb()

View File

@ -57,7 +57,6 @@ class BaseTaskFlowEngine(object):
def __init__(self):
# work around for https://bugs.python.org/issue7980
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(
max_workers=CONF.task_flow.max_workers)

View File

@ -63,7 +63,6 @@ class HealthManager(object):
else:
self.cw = cw2.ControllerWorker()
self.threads = CONF.health_manager.failover_threads
# pylint: disable=consider-using-with
self.executor = futures.ThreadPoolExecutor(max_workers=self.threads)
self.amp_repo = repo.AmphoraRepository()
self.amp_health_repo = repo.AmphoraHealthRepository()

View File

@ -94,7 +94,6 @@ allowlist_externals =
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =