Merge "Update to latest pep8/code style versions"

This commit is contained in:
Zuul 2024-01-03 14:57:53 +00:00 committed by Gerrit Code Review
commit f1a4aeb29a
2 changed files with 5 additions and 5 deletions

View File

@ -706,7 +706,7 @@ def _validate_image_info(ext, image_info=None, **kwargs):
msg = 'Image is missing \'{}\' field.'.format(field) msg = 'Image is missing \'{}\' field.'.format(field)
raise errors.InvalidCommandParamsError(msg) raise errors.InvalidCommandParamsError(msg)
if type(image_info['urls']) != list or not image_info['urls']: if not isinstance(image_info['urls'], list) or not image_info['urls']:
raise errors.InvalidCommandParamsError( raise errors.InvalidCommandParamsError(
'Image \'urls\' must be a list with at least one element.') 'Image \'urls\' must be a list with at least one element.')

View File

@ -37,11 +37,11 @@ commands = stestr run {posargs}
[testenv:pep8] [testenv:pep8]
deps = deps =
hacking~=6.0.0 # Apache-2.0 hacking~=6.1.0 # Apache-2.0
bashate>=0.5.1 # Apache-2.0 bashate~=2.1.0 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3 flake8-import-order~=0.18.0 # LGPLv3
pycodestyle>=2.0.0,<3.0.0 # MIT pycodestyle>=2.0.0,<3.0.0 # MIT
doc8>=0.8.1 # Apache-2.0 doc8~=1.1.0 # Apache-2.0
allowlist_externals = bash allowlist_externals = bash
{toxinidir}/tools/run_bashate.sh {toxinidir}/tools/run_bashate.sh
commands = commands =