Merge "Fix H702 errors and enable them"

This commit is contained in:
Jenkins 2013-06-12 08:37:25 +00:00 committed by Gerrit Code Review
commit 7740c6c4a8
4 changed files with 7 additions and 7 deletions

View File

@ -291,7 +291,7 @@ class StackController(object):
return result
if action not in self.CREATE_OR_UPDATE_ACTION:
msg = _("Unexpected action %s" % action)
msg = _('Unexpected action %s') % action
# This should not happen, so return HeatInternalFailureError
return exception.HeatInternalFailureError(detail=msg)

View File

@ -176,7 +176,7 @@ class KeystoneStrategy(BaseStrategy):
elif resp.status == 404:
raise exception.AuthUrlNotFound(url=token_url)
else:
raise Exception(_('Unexpected response: %s' % resp.status))
raise Exception(_('Unexpected response: %s') % resp.status)
def _v2_auth(self, token_url):
def get_endpoint(service_catalog):

View File

@ -74,9 +74,10 @@ class Stack(object):
'''
if re.match("[a-zA-Z][a-zA-Z0-9_.-]*$", stack_name) is None:
raise ValueError(_("Invalid stack name %s" % stack_name
+ ", must contain only alphanumeric or "
+ "\"_-.\" characters, must start with alpha"))
raise ValueError(_('Invalid stack name %s'
' must contain only alphanumeric or '
'\"_-.\" characters, must start with alpha'
) % stack_name)
self.id = stack_id
self.context = context

View File

@ -22,7 +22,7 @@ commands =
python setup.py testr --coverage
[flake8]
ignore = F403,F841,H201,H302,H303,H306,H404,H702,H703
ignore = F403,F841,H201,H302,H303,H306,H404,H703
# F403 'from sqlalchemy import *' used; unable to detect undefined names
# F841 local variable 'json_template' is assigned to but never used
# H201 no 'except:' at least use 'except Exception:'
@ -30,7 +30,6 @@ ignore = F403,F841,H201,H302,H303,H306,H404,H702,H703
# H303 No wildcard (*) import.
# H306 imports not in alphabetical order
# H404 multi line docstring should start with a summary
# H702 Formatting operation should be outside of localization method call
# H703 Multiple positional placeholders
show-source = true
builtins = _