Commit 221d41c0 authored by Michal Čihař's avatar Michal Čihař

PEP8 fixes

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 8e87ad58
......@@ -747,8 +747,8 @@ def sync_create_groups(sender, app, **kwargs):
'''
Create groups on syncdb.
'''
if (app == 'accounts'
or getattr(app, '__name__', '') == 'weblate.accounts.models'):
if (app == 'accounts' or
getattr(app, '__name__', '') == 'weblate.accounts.models'):
create_groups(False)
if 'south' in settings.INSTALLED_APPS:
......
......@@ -108,8 +108,8 @@ def user_full_name(strategy, details, user=None, **kwargs):
if user:
full_name = details.get('fullname', '').strip()
if (not full_name
and ('first_name' in details or 'last_name' in details)):
if (not full_name and
('first_name' in details or 'last_name' in details)):
first_name = details.get('first_name', '')
last_name = details.get('last_name', '')
......
......@@ -30,7 +30,7 @@ class WeblateStrategy(DjangoStrategy):
"""
super(WeblateStrategy, self).__init__(storage, request, tpl)
if (request and
self.session.session_key is None
and 'id' in request.GET):
self.session.session_key is None and
'id' in request.GET):
engine = import_module(settings.SESSION_ENGINE)
self.session = engine.SessionStore(request.GET['id'])
......@@ -305,7 +305,7 @@ def handle_translate(translation, request, user_locked,
elif not user_locked:
# Custom commit message
message = requst.POST.get('commit_message')
if message and message != unit.translation.commit_message):
if message and message != unit.translation.commit_message:
# Commit pending changes so that they don't get new message
unit.translation.commit_pending(request, request.user)
# Store new commit message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment