summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--heatclient/common/base.py4
-rw-r--r--heatclient/shell.py17
-rw-r--r--heatclient/tests/fakes.py12
-rw-r--r--heatclient/v1/stacks.py10
-rw-r--r--tox.ini2
5 files changed, 19 insertions, 26 deletions
diff --git a/heatclient/common/base.py b/heatclient/common/base.py
index 3cedd32..513a674 100644
--- a/heatclient/common/base.py
+++ b/heatclient/common/base.py
@@ -99,8 +99,8 @@ class Resource(object):
return self.__dict__[k]
def __repr__(self):
- reprkeys = sorted(k for k in self.__dict__.keys() if k[0] != '_' and
- k != 'manager')
+ reprkeys = sorted(k for k in self.__dict__.keys()
+ if k[0] != '_' and k != 'manager')
info = ", ".join("%s=%s" % (k, getattr(self, k)) for k in reprkeys)
return "<%s %s>" % (self.__class__.__name__, info)
diff --git a/heatclient/shell.py b/heatclient/shell.py
index 2651f49..4d2f5cf 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -43,8 +43,7 @@ class HeatShell(object):
# Global arguments
parser.add_argument('-h', '--help',
action='store_true',
- help=argparse.SUPPRESS,
- )
+ help=argparse.SUPPRESS)
parser.add_argument('-d', '--debug',
default=bool(utils.env('HEATCLIENT_DEBUG')),
@@ -123,8 +122,8 @@ class HeatShell(object):
help=argparse.SUPPRESS)
parser.add_argument('--os-auth-token',
- default=utils.env('OS_AUTH_TOKEN'),
- help='Defaults to env[OS_AUTH_TOKEN]')
+ default=utils.env('OS_AUTH_TOKEN'),
+ help='Defaults to env[OS_AUTH_TOKEN]')
parser.add_argument('--os_auth_token',
help=argparse.SUPPRESS)
@@ -195,12 +194,10 @@ class HeatShell(object):
help=help,
description=desc,
add_help=False,
- formatter_class=HelpFormatter
- )
+ formatter_class=HelpFormatter)
subparser.add_argument('-h', '--help',
action='help',
- help=argparse.SUPPRESS,
- )
+ help=argparse.SUPPRESS)
self.subcommands[command] = subparser
for (args, kwargs) in arguments:
subparser.add_argument(*args, **kwargs)
@@ -225,8 +222,8 @@ class HeatShell(object):
def _get_endpoint(self, client, **kwargs):
"""Get an endpoint using the provided keystone client."""
return client.service_catalog.url_for(
- service_type=kwargs.get('service_type') or 'orchestration',
- endpoint_type=kwargs.get('endpoint_type') or 'publicURL')
+ service_type=kwargs.get('service_type') or 'orchestration',
+ endpoint_type=kwargs.get('endpoint_type') or 'publicURL')
def _setup_debugging(self, debug):
if debug:
diff --git a/heatclient/tests/fakes.py b/heatclient/tests/fakes.py
index 653b91c..09f105d 100644
--- a/heatclient/tests/fakes.py
+++ b/heatclient/tests/fakes.py
@@ -10,17 +10,15 @@ def script_keystone_client():
password='password',
tenant_id='',
tenant_name='tenant_name',
- username='username').AndReturn(
- FakeKeystone('abcd1234'))
+ username='username').AndReturn(FakeKeystone('abcd1234'))
def script_heat_list():
resp_dict = {"stacks": [{
- "id": "1",
- "stack_name": "teststack",
- "stack_status": 'CREATE_COMPLETE',
- "creation_time": "2012-10-25T01:58:47Z"
- },
+ "id": "1",
+ "stack_name": "teststack",
+ "stack_status": 'CREATE_COMPLETE',
+ "creation_time": "2012-10-25T01:58:47Z"},
{
"id": "2",
"stack_name": "teststack2",
diff --git a/heatclient/v1/stacks.py b/heatclient/v1/stacks.py
index 565de94..6b3231f 100644
--- a/heatclient/v1/stacks.py
+++ b/heatclient/v1/stacks.py
@@ -82,14 +82,13 @@ class StackManager(base.Manager):
def create(self, **kwargs):
"""Create a stack."""
- resp, body = self.api.json_request(
- 'POST', '/stacks', body=kwargs)
+ resp, body = self.api.json_request('POST', '/stacks', body=kwargs)
def update(self, **kwargs):
"""Update a stack."""
stack_id = kwargs.pop('stack_id')
- resp, body = self.api.json_request(
- 'PUT', '/stacks/%s' % stack_id, body=kwargs)
+ resp, body = self.api.json_request('PUT', '/stacks/%s' % stack_id,
+ body=kwargs)
def delete(self, stack_id):
"""Delete a stack."""
@@ -115,8 +114,7 @@ class StackManager(base.Manager):
def validate(self, **kwargs):
"""Validate a stack template."""
- resp, body = self.api.json_request(
- 'POST', '/validate', body=kwargs)
+ resp, body = self.api.json_request('POST', '/validate', body=kwargs)
return body
diff --git a/tox.ini b/tox.ini
index b3d2218..c5fa5ec 100644
--- a/tox.ini
+++ b/tox.ini
@@ -22,6 +22,6 @@ downloadcache = ~/cache/pip
[flake8]
show-source = True
-ignore = E12,H302,H303,H304,H403,H404,F403,F821,F841
+ignore = E121,E128,H302,H303,H304,H403,H404,F403,F821,F841
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build