pep8: Fix E131.

This commit is contained in:
Alex Huang 2016-12-01 23:15:05 -08:00 committed by Tim Abbott
parent c8ddea16c3
commit 007b693cc7
8 changed files with 24 additions and 29 deletions

View File

@ -86,7 +86,7 @@ def check_pep8(files):
'E402', 'E501', 'W503', 'E711', 'E128', 'E226',
'E126', 'E121', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303',
'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E731', 'E302', 'E129',
'E741', 'E714', 'W391', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306',
'E741', 'E714', 'W391', 'E713', 'E502', 'E305', 'E251', 'E306',
]
pep8 = subprocess.Popen(
['pycodestyle'] + files + ['--ignore={rules}'.format(rules=','.join(ignored_rules))],

View File

@ -179,7 +179,7 @@ def handle_digest_email(user_profile_id, cutoff):
# You can't have an unread message that you sent, but when testing
# this causes confusion so filter your messages out.
pms = all_messages.filter(
~Q(message__recipient__type=Recipient.STREAM) & \
~Q(message__recipient__type=Recipient.STREAM) &
~Q(message__sender=user_profile))
# Show up to 4 missed PMs.

View File

@ -51,7 +51,8 @@ class AdminZulipHandler(logging.Handler):
method = request.method,
path = request.path,
data = request.GET if request.method == 'GET'
else filter.get_post_parameters(request),
else
(filter.get_post_parameters(request)),
remote_addr = request.META.get('REMOTE_ADDR', None),
query_string = request.META.get('QUERY_STRING', None),
server_name = request.META.get('SERVER_NAME', None),

View File

@ -605,22 +605,16 @@ def home_real(request):
cross_realm_bots = list(get_cross_realm_dicts()),
# Stream message notification settings:
stream_desktop_notifications_enabled =
user_profile.enable_stream_desktop_notifications,
stream_desktop_notifications_enabled = user_profile.enable_stream_desktop_notifications,
stream_sounds_enabled = user_profile.enable_stream_sounds,
# Private message and @-mention notification settings:
desktop_notifications_enabled = desktop_notifications_enabled,
sounds_enabled =
user_profile.enable_sounds,
enable_offline_email_notifications =
user_profile.enable_offline_email_notifications,
enable_offline_push_notifications =
user_profile.enable_offline_push_notifications,
enable_online_push_notifications =
user_profile.enable_online_push_notifications,
sounds_enabled = user_profile.enable_sounds,
enable_offline_email_notifications = user_profile.enable_offline_email_notifications,
enable_offline_push_notifications = user_profile.enable_offline_push_notifications,
enable_online_push_notifications = user_profile.enable_online_push_notifications,
twenty_four_hour_time = register_ret['twenty_four_hour_time'],
enable_digest_emails = user_profile.enable_digest_emails,
event_queue_id = register_ret['queue_id'],
last_event_id = register_ret['last_event_id'],

View File

@ -156,7 +156,7 @@ def parse_comment(message):
'values': {
'user': message["change"]["user"]["name"],
'subject': message["data"]["subject"] if "subject" in list(message["data"].keys()) else
message["data"]["name"]
(message["data"]["name"])
}
}
@ -170,7 +170,7 @@ def parse_create_or_delete(message):
{
'user': message["data"]["owner"]["name"],
'subject': message["data"]["subject"] if "subject" in list(message["data"].keys()) else
message["data"]["name"]
(message["data"]["name"])
}
}