Fix PDF docs build

Update tox config to include upper-constraints as dependencies. This
resolves issues with building PDF docs.

New pylint 2.9.0 provides some new checkers and detects new errors with
existing checkers:

 - consider-using-dict-items

Similar change was done in Octavia repo already.

Change-Id: I48106513291263a7f754cfe7f9edc3703f8fbb7a
This commit is contained in:
likui 2021-05-18 19:25:02 +08:00 committed by Brian Haley
parent 3208f7fbca
commit 6a9cd92ae0
2 changed files with 4 additions and 3 deletions

View File

@ -22,10 +22,9 @@ class BaseDataModel():
"""Converts a data model to a dictionary."""
calling_classes = calling_classes or []
ret = {}
for attr in self.__dict__:
for attr, value in self.__dict__.items():
if attr.startswith('_') or not kwargs.get(attr, True):
continue
value = self.__dict__[attr]
if recurse:
if isinstance(getattr(self, attr), list):

View File

@ -43,7 +43,9 @@ commands =
coverage report --fail-under=95 --skip-covered
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
whitelist_externals = rm
commands =
rm -rf doc/build doc/source/reference/modules