Run flake8 also on cinder/common
Even though testenvs pep8 and pep8-constraints included cinder/common directory to be processed by flake8, global configuration in flake8 secion was excluding common glob preventing the directory from being checked. This patch removes glob from flake8 exclude section, unnecessary cinder/common inclusion when running flake8, and fixes cinder/common/config.py. If we had a common directory in our code root and wanted to exclude it, glob should be ./common instead of just common like we had now. Change-Id: Iefc64c02335ed9296bda323fdcb5688125fb4e77
This commit is contained in:
parent
7e040192d4
commit
e374a952af
@ -171,7 +171,8 @@ global_opts = [
|
||||
cfg.StrOpt('auth_strategy',
|
||||
default='keystone',
|
||||
choices=['noauth', 'keystone'],
|
||||
help='The strategy to use for auth. Supports noauth or keystone.'),
|
||||
help='The strategy to use for auth. Supports noauth or '
|
||||
'keystone.'),
|
||||
cfg.ListOpt('enabled_backends',
|
||||
help='A list of backend names to use. These backend names '
|
||||
'should be backed by a unique [CONFIG] group '
|
||||
|
6
tox.ini
6
tox.ini
@ -43,7 +43,7 @@ commands = {[testenv:py34]commands}
|
||||
|
||||
[testenv:pep8]
|
||||
commands =
|
||||
flake8 {posargs} . cinder/common
|
||||
flake8 {posargs} .
|
||||
# Check that .po and .pot files are valid:
|
||||
bash -c "find cinder -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
{toxinidir}/tools/config/check_uptodate.sh --checkopts
|
||||
@ -53,7 +53,7 @@ commands =
|
||||
[testenv:pep8-constraints]
|
||||
install_command = {[testenv:common-constraints]install_command}
|
||||
commands =
|
||||
flake8 {posargs} . cinder/common
|
||||
flake8 {posargs} .
|
||||
# Check that .po and .pot files are valid:
|
||||
bash -c "find cinder -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
||||
{toxinidir}/tools/config/check_uptodate.sh --checkopts
|
||||
@ -122,7 +122,7 @@ commands = bandit -c tools/bandit.yaml -r cinder -n 5 -ll
|
||||
# E251 unexpected spaces around keyword / parameter equals
|
||||
# reason: no improvement in readability
|
||||
ignore = E251
|
||||
exclude = .git,.venv,.tox,dist,tools,doc,common,*egg,build
|
||||
exclude = .git,.venv,.tox,dist,tools,doc,*egg,build
|
||||
max-complexity=30
|
||||
|
||||
[hacking]
|
||||
|
Loading…
Reference in New Issue
Block a user