Enable pep8 E128 test

Enable E128 continuation line under-indented for visual indent

Change-Id: If662f729e7aacdd439b38c5e5630d74afefebcc6
This commit is contained in:
ricolin 2015-11-15 23:16:35 +08:00
parent 2cef6de886
commit ec2530b975
4 changed files with 109 additions and 108 deletions

View File

@ -49,19 +49,19 @@ class HeatShell(object):
# they should be provided by python-keystoneclient. We will need to
# refactor this code once this functionality is avaible in
# python-keystoneclient.
parser.add_argument('-k', '--insecure',
default=False,
action='store_true',
parser.add_argument(
'-k', '--insecure', default=False, action='store_true',
help=_('Explicitly allow heatclient to perform '
'\"insecure SSL\" (https) requests. The server\'s '
'certificate will not be verified against any '
'certificate authorities. This option should '
'be used with caution.'))
'\"insecure SSL\" (https) requests. '
'The server\'s certificate will not be verified '
'against any certificate authorities. '
'This option should be used with caution.'))
parser.add_argument('--os-cert',
help=_('Path of certificate file to use in SSL '
'connection. This file can optionally be '
'prepended with the private key.'))
parser.add_argument(
'--os-cert',
help=_('Path of certificate file to use in SSL connection. '
'This file can optionally be prepended with '
'the private key.'))
# for backward compatibility only
parser.add_argument('--cert-file',
@ -72,7 +72,8 @@ class HeatShell(object):
parser.add_argument('--os-key',
help=_('Path of client key to use in SSL '
'connection. This option is not necessary '
'if your key is prepended to your cert file.'))
'if your key is prepended to your cert '
'file.'))
parser.add_argument('--key-file',
dest='os_key',
@ -334,17 +335,17 @@ class HeatShell(object):
self._append_global_identity_args(parser)
if osprofiler_profiler:
parser.add_argument('--profile',
parser.add_argument(
'--profile',
metavar='HMAC_KEY',
help=_('HMAC key to use for encrypting '
'context data for performance profiling of '
'operation. This key should be the value of '
'HMAC key configured in osprofiler middleware '
'in heat, it is specified in the paste '
'configuration (/etc/heat/api-paste.ini). '
'Without the key, profiling will not be '
'triggered even if osprofiler is enabled '
'on server side.'))
help=_('HMAC key to use for encrypting context data '
'for performance profiling of operation. '
'This key should be the value of HMAC key '
'configured in osprofiler middleware in heat, '
'it is specified in the paste configuration '
'(/etc/heat/api-paste.ini). Without the key, '
'profiling will not be triggered '
'even if osprofiler is enabled on server side.'))
return parser
def get_subcommand_parser(self, version):
@ -546,22 +547,22 @@ class HeatShell(object):
return 0
if not args.os_username and not args.os_auth_token:
raise exc.CommandError(_("You must provide a username via"
" either --os-username or env[OS_USERNAME]"
raise exc.CommandError(_("You must provide a username via either "
"--os-username or env[OS_USERNAME] "
"or a token via --os-auth-token or "
"env[OS_AUTH_TOKEN]"))
if not args.os_password and not args.os_auth_token:
raise exc.CommandError(_("You must provide a password via"
" either --os-password or env[OS_PASSWORD]"
raise exc.CommandError(_("You must provide a password via either "
"--os-password or env[OS_PASSWORD] "
"or a token via --os-auth-token or "
"env[OS_AUTH_TOKEN]"))
if args.os_no_client_auth:
if not args.heat_url:
raise exc.CommandError(_("If you specify --os-no-client-auth "
" you must also specify a Heat API URL"
" via either --heat-url or"
"you must also specify a Heat API "
"URL via either --heat-url or "
"env[HEAT_URL]"))
else:
# Tenant/project name or ID is needed to make keystoneclient
@ -570,15 +571,13 @@ class HeatShell(object):
if not (args.os_tenant_id or args.os_tenant_name or
args.os_project_id or args.os_project_name):
raise exc.CommandError(_("You must provide a tenant id via"
" either --os-tenant-id or"
" env[OS_TENANT_ID] or a tenant name"
" via either --os-tenant-name or"
" env[OS_TENANT_NAME] or a project id"
" via either --os-project-id or"
" env[OS_PROJECT_ID] or a project"
" name via either --os-project-name or"
" env[OS_PROJECT_NAME]"))
raise exc.CommandError(
_("You must provide a tenant id via either "
"--os-tenant-id or env[OS_TENANT_ID] or a tenant name "
"via either --os-tenant-name or env[OS_TENANT_NAME] "
"or a project id via either --os-project-id or "
"env[OS_PROJECT_ID] or a project name via "
"either --os-project-name or env[OS_PROJECT_NAME]"))
if not args.os_auth_url:
raise exc.CommandError(_("You must provide an auth url via "

View File

@ -82,8 +82,8 @@ def _authenticated_fetcher(hc):
help=_('Enable rollback on create/update failure.'))
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Parameter values used to create the stack. '
'This can be specified multiple times, or once with parameters '
'separated by a semicolon.'),
'This can be specified multiple times, or once with '
'parameters separated by a semicolon.'),
action='append')
@utils.arg('-Pf', '--parameter-file', metavar='<KEY=FILE>',
help=_('Parameter values from file used to create the stack. '
@ -185,8 +185,8 @@ def hooks_to_env(env, arg_hooks, hook):
@utils.arg('-r', '--enable-rollback', default=False, action="store_true",
help=_('Enable rollback on create/update failure.'))
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Parameter values used to create the stack. '
'This can be specified multiple times, or once with parameters '
help=_('Parameter values used to create the stack. This can be '
'specified multiple times, or once with parameters '
'separated by a semicolon.'),
action='append')
@utils.arg('name', metavar='<STACK_NAME>',
@ -239,16 +239,16 @@ def do_stack_adopt(hc, args):
@utils.arg('-o', '--template-object', metavar='<URL>',
help=_('URL to retrieve template object (e.g. from swift)'))
@utils.arg('-t', '--timeout', metavar='<TIMEOUT>', type=int,
help=_('Stack creation timeout in minutes. This is only used during'
'validation in preview.'))
help=_('Stack creation timeout in minutes. This is only used '
'during validation in preview.'))
@utils.arg('-r', '--enable-rollback', default=False, action="store_true",
help=_('Enable rollback on failure. This option is not used during '
'preview and exists only for symmetry with %(cmd)s.')
% {'cmd': 'stack-create'})
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Parameter values used to preview the stack. '
'This can be specified multiple times, or once with parameters '
'separated by semicolon.'),
'This can be specified multiple times, or once with '
'parameters separated by semicolon.'),
action='append')
@utils.arg('-Pf', '--parameter-file', metavar='<KEY=FILE>',
help=_('Parameter values from file used to create the stack. '
@ -426,15 +426,16 @@ def do_stack_show(hc, args):
help=_('Set rollback on update failure. '
'Values %(true)s set rollback to enabled. '
'Values %(false)s set rollback to disabled. '
'Default is to use the value of existing stack to be updated.')
'Default is to use the value of existing stack to be '
'updated.')
% {'true': strutils.TRUE_STRINGS, 'false': strutils.FALSE_STRINGS})
@utils.arg('-y', '--dry-run', default=False, action="store_true",
help='Do not actually perform the stack update, but show what '
'would be changed')
@utils.arg('-P', '--parameters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Parameter values used to create the stack. '
'This can be specified multiple times, or once with parameters '
'separated by a semicolon.'),
'This can be specified multiple times, or once with '
'parameters separated by a semicolon.'),
action='append')
@utils.arg('-Pf', '--parameter-file', metavar='<KEY=FILE>',
help=_('Parameter values from file used to create the stack. '
@ -443,17 +444,18 @@ def do_stack_show(hc, args):
action='append')
@utils.arg('-x', '--existing', default=False, action="store_true",
help=_('Re-use the template, parameters and environment of the '
'current stack. If the template argument is omitted then the '
'existing template is used. If no %(env_arg)s is specified then '
'the existing environment is used. '
'Parameters specified in %(arg)s will patch over the existing '
'values in the current stack. Parameters omitted will keep '
'the existing values.')
'current stack. If the template argument is omitted then '
'the existing template is used. If no %(env_arg)s is '
'specified then the existing environment is used. '
'Parameters specified in %(arg)s will patch over the '
'existing values in the current stack. Parameters omitted '
'will keep the existing values.')
% {'arg': '--parameters', 'env_arg': '--environment-file'})
@utils.arg('-c', '--clear-parameter', metavar='<PARAMETER>',
help=_('Remove the parameters from the set of parameters of '
'current stack for the %(cmd)s. The default value in the '
'template will be used. This can be specified multiple times.')
'template will be used. This can be specified multiple '
'times.')
% {'cmd': 'stack-update'},
action='append')
@utils.arg('id', metavar='<NAME or ID>',
@ -554,8 +556,8 @@ def do_stack_cancel_update(hc, args):
help=_('Include hidden stacks in the stack listing.'))
@utils.arg('-f', '--filters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Filter parameters to apply on returned stacks. '
'This can be specified multiple times, or once with parameters '
'separated by a semicolon.'),
'This can be specified multiple times, or once with '
'parameters separated by a semicolon.'),
action='append')
@utils.arg('-t', '--tags', metavar='<TAG1,TAG2...>',
help=_('Show stacks containing these tags, combine multiple tags '
@ -716,9 +718,9 @@ def do_output_show(hc, args):
@utils.arg('-f', '--filters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Filter parameters to apply on returned resource types. '
'This can be specified multiple times, or once with parameters '
'separated by a semicolon. It can be any of name, version and '
'support_status'),
'This can be specified multiple times, or once with '
'parameters separated by a semicolon. It can be any of '
'name, version and support_status'),
action='append')
def do_resource_type_list(hc, args):
'''List the available resource types.'''
@ -1010,8 +1012,8 @@ def do_hook_clear(hc, args):
help=_('Name of the resource to filter events by.'))
@utils.arg('-f', '--filters', metavar='<KEY1=VALUE1;KEY2=VALUE2...>',
help=_('Filter parameters to apply on returned events. '
'This can be specified multiple times, or once with parameters '
'separated by a semicolon.'),
'This can be specified multiple times, or once with '
'parameters separated by a semicolon.'),
action='append')
@utils.arg('-l', '--limit', metavar='<LIMIT>',
help=_('Limit the number of events returned.'))

View File

@ -42,7 +42,7 @@ commands=
downloadcache = ~/cache/pip
[flake8]
ignore = E123,E126,E128
ignore = E123,E126
show-source = True
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build
max-complexity=20