Add Hacking checks
Change-Id: I5435e83a8dbe3c3273b59ecb3c5f1be26c9bec96
This commit is contained in:
parent
72bc53b67c
commit
dbd8617122
@ -81,7 +81,7 @@ class UpdateDomainCommand(base.UpdateCommand):
|
||||
return parser
|
||||
|
||||
def execute(self, parsed_args):
|
||||
# TODO: API needs updating.. this get is silly
|
||||
# TODO(kiall): API needs updating.. this get is silly
|
||||
domain = self.client.domains.get(parsed_args.id)
|
||||
|
||||
if parsed_args.name:
|
||||
|
@ -107,7 +107,7 @@ class UpdateRecordCommand(base.UpdateCommand):
|
||||
return parser
|
||||
|
||||
def execute(self, parsed_args):
|
||||
# TODO: API needs updating.. this get is silly
|
||||
# TODO(kiall): API needs updating.. this get is silly
|
||||
record = self.client.records.get(parsed_args.domain_id, parsed_args.id)
|
||||
|
||||
if parsed_args.name:
|
||||
|
@ -73,7 +73,7 @@ class UpdateServerCommand(base.UpdateCommand):
|
||||
return parser
|
||||
|
||||
def execute(self, parsed_args):
|
||||
# TODO: API needs updating.. this get is silly
|
||||
# TODO(kiall): API needs updating.. this get is silly
|
||||
server = self.client.servers.get(parsed_args.id)
|
||||
|
||||
if parsed_args.name:
|
||||
|
@ -24,13 +24,15 @@ class ResourceNotFound(Base):
|
||||
|
||||
|
||||
class RemoteError(Base):
|
||||
def __init__(self, message=None, code=None, type=None, errors=None):
|
||||
def __init__(self, message=None, code=None, type=None, errors=None,
|
||||
request_id=None):
|
||||
super(RemoteError, self).__init__(message)
|
||||
|
||||
self.message = message
|
||||
self.code = code
|
||||
self.type = type
|
||||
self.errors = errors
|
||||
self.request_id = request_id
|
||||
|
||||
|
||||
class Unknown(RemoteError):
|
||||
|
@ -1,4 +1,14 @@
|
||||
flake8
|
||||
# Packages needed for dev testing
|
||||
distribute>=0.6.24
|
||||
|
||||
# Install bounded pep8/pyflakes first, then let flake8 install
|
||||
pep8==1.4.5
|
||||
pyflakes==0.7.2
|
||||
flake8==2.0
|
||||
hacking>=0.5.3,<0.6
|
||||
|
||||
coverage>=3.6
|
||||
|
||||
mox
|
||||
python-subunit
|
||||
sphinx
|
||||
|
15
tox.ini
15
tox.ini
@ -1,8 +1,9 @@
|
||||
[tox]
|
||||
envlist = py26,py27,pep8
|
||||
envlist = py26,py27,flake8
|
||||
minversion = 1.4.0
|
||||
|
||||
[testenv]
|
||||
sitepackages = False
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
LANG=en_US.UTF-8
|
||||
LANGUAGE=en_US:en
|
||||
@ -11,15 +12,19 @@ deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
python setup.py testr --testr-args='{posargs}'
|
||||
sitepackages = False
|
||||
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:flake8]
|
||||
commands = flake8
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8
|
||||
|
||||
[testenv:pyflakes]
|
||||
commands = flake8
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
|
||||
@ -27,6 +32,6 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = E12,E711,E721,E712,F,H302
|
||||
show-source = True
|
||||
ignore = H302,H306,H401,H402,H404
|
||||
builtins = _
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||
|
Loading…
x
Reference in New Issue
Block a user