]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Run flake8 also on cinder/common
authorGorka Eguileor <geguileo@redhat.com>
Thu, 21 Jan 2016 13:12:56 +0000 (14:12 +0100)
committerGorka Eguileor <geguileo@redhat.com>
Thu, 21 Jan 2016 13:17:34 +0000 (14:17 +0100)
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

cinder/common/config.py
tox.ini

index f7181723f0550ba2ac9b34f73aa1a9bca8edac03..4965fc2904f8c0c3170ad700f0c5ef1f507a6aaa 100644 (file)
@@ -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 '
diff --git a/tox.ini b/tox.ini
index fb71b5829a77d8acd2780125582475582da9478f..934f836ddb814cff75e52c513f8509f319b76f6c 100644 (file)
--- a/tox.ini
+++ b/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]