# License for the specific language governing permissions and limitations
# under the License.
-
-import webob
-from lxml import etree
import iso8601
+from lxml import etree
+import webob
from cinder.api.openstack import volume
from cinder.api.openstack import xmlutil
from cinder.api.openstack import volume
from cinder.api.openstack.volume import snapshots
-from cinder.api.openstack.volume import volumes
from cinder.api.openstack.volume import versions
+from cinder.api.openstack.volume import volumes
from cinder.api.openstack import wsgi
from cinder import flags
from cinder.openstack.common import log as logging
#
# Until all these issues get fixed, ignore.
- ignore='--ignore=N4,N306'
+ ignore='--ignore=N4,E12,E711,E712,E721,E502'
${wrapper} python tools/hacking.py ${ignore} ${srcfiles}
}
N201
"""
if logical_line.startswith("except:"):
- return 6, "CINDER N201: no 'except:' at least use 'except Exception:'"
+ yield 6, "CINDER N201: no 'except:' at least use 'except Exception:'"
def cinder_except_format_assert(logical_line):
N202
"""
if logical_line.startswith("self.assertRaises(Exception"):
- return 1, "CINDER N202: assertRaises Exception too broad"
+ yield 1, "CINDER N202: assertRaises Exception too broad"
def cinder_one_import_per_line(logical_line):
if pos > -1 and (parts[0] == "import" or
parts[0] == "from" and parts[2] == "import") and \
not is_import_exception(parts[1]):
- return pos, "CINDER N301: one import per line"
+ yield pos, "CINDER N301: one import per line"
_missingImport = set([])
(len(split_line) == 2 or
(len(split_line) == 4 and split_line[2] == "as"))):
mod = split_line[1]
- return importModuleCheck(mod)
+ rval = importModuleCheck(mod)
+ if rval != None:
+ yield rval
# TODO(jogo) handle "from x import *"
map(gen.send, tokens)
gen.close()
except LocalizationError as e:
- return e.args
+ yield e.args
#TODO(jogo) Dict and list objects
nosexcover
openstack.nose_plugin
nosehtmloutput
-pep8==1.1
+pep8==1.3.3
pylint==0.25.2
sphinx>=1.1.2
MySQL-python
commands = /bin/bash run_tests.sh -N -P {posargs}
[testenv:pep8]
-deps = pep8==1.1
+deps = pep8==1.3.3
commands =
- python tools/hacking.py --ignore=N4,E12,E711,E721 --repeat --show-source \
+ python tools/hacking.py --ignore=N4,E12,E711,E712,E721,E502 --repeat --show-source \
--exclude=.venv,.tox,dist,doc,openstack,*egg .
- python tools/hacking.py --ignore=N4,E12,E711,E721 --repeat --show-source \
+ python tools/hacking.py --ignore=N4,E12,E711,E712,E721,E502 --repeat --show-source \
--filename=cinder* bin
[testenv:venv]