Fix PEP8: E126 continuation line over-indented

for hanging indent
This commit is contained in:
stv
2014-11-08 21:47:05 -08:00
parent 2ce5a6ceed
commit 6763c5dd74
7 changed files with 58 additions and 44 deletions

View File

@@ -24,15 +24,13 @@ class UserStandingMiddleware(object):
else:
if user_account.account_status == UserStanding.ACCOUNT_DISABLED:
msg = _(
'Your account has been disabled. If you believe '
'this was done in error, please contact us at '
'{link_start}{support_email}{link_end}'
'Your account has been disabled. If you believe '
'this was done in error, please contact us at '
'{support_email}'
).format(
support_email=settings.DEFAULT_FEEDBACK_EMAIL,
link_start=u'<a href="mailto:{address}?subject={subject_line}">'.format(
address=settings.DEFAULT_FEEDBACK_EMAIL,
subject_line=_('Disabled Account'),
),
link_end=u'</a>'
support_email=u'<a href="mailto:{address}?subject={subject_line}">{address}</a>'.format(
address=settings.DEFAULT_FEEDBACK_EMAIL,
subject_line=_('Disabled Account'),
),
)
return HttpResponseForbidden(msg)

View File

@@ -24,15 +24,20 @@ class TagRegistry(object):
if len(cls.tags) == 0:
raise ValueError("No tags specified for class {0}".format(cls.__name__))
for t in cls.tags:
if t in self._mapping:
other_cls = self._mapping[t]
for tag in cls.tags:
if tag in self._mapping:
other_cls = self._mapping[tag]
if cls == other_cls:
# registering the same class multiple times seems silly, but ok
continue
raise ValueError("Tag {0} already registered by class {1}."
" Can't register for class {2}"
.format(t, other_cls.__name__, cls.__name__))
raise ValueError(
"Tag {0} already registered by class {1}."
" Can't register for class {2}".format(
tag,
other_cls.__name__,
cls.__name__,
)
)
# Ok, should be good to change state now.
for t in cls.tags:

View File

@@ -368,7 +368,8 @@ class DragAndDrop(object):
if draggable_name in answer['draggables']:
user_groups_data.append(draggable_name)
user_positions_data.append(
draggable_dict[draggable_name])
draggable_dict[draggable_name]
)
# proved that this is not excess
self.excess_draggables[draggable_name] = False