mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
pep8: Fix E122.
This commit is contained in:
@@ -307,7 +307,7 @@ as normal.'''.replace("\n", " ")
|
|||||||
parser.add_option('--mode',
|
parser.add_option('--mode',
|
||||||
default=None,
|
default=None,
|
||||||
action='store',
|
action='store',
|
||||||
help= \
|
help=
|
||||||
'''Which mode to run in. Valid options are "personal" and "public". In
|
'''Which mode to run in. Valid options are "personal" and "public". In
|
||||||
"personal" mode, the mirror uses an individual users' credentials and mirrors
|
"personal" mode, the mirror uses an individual users' credentials and mirrors
|
||||||
all messages they send on Zulip to Jabber and all private Jabber messages to
|
all messages they send on Zulip to Jabber and all private Jabber messages to
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ except ImportError as e:
|
|||||||
EXCLUDED_FILES = """
|
EXCLUDED_FILES = """
|
||||||
api/integrations/perforce/git_p4.py
|
api/integrations/perforce/git_p4.py
|
||||||
api/setup.py
|
api/setup.py
|
||||||
|
docs/conf.py
|
||||||
docs/html_unescape.py
|
docs/html_unescape.py
|
||||||
node_modules
|
node_modules
|
||||||
puppet/apt/.forge-release
|
puppet/apt/.forge-release
|
||||||
@@ -83,7 +84,7 @@ def check_pep8(files):
|
|||||||
failed = False
|
failed = False
|
||||||
ignored_rules = [
|
ignored_rules = [
|
||||||
'E402', 'E501', 'W503', 'E711', 'E128', 'E226',
|
'E402', 'E501', 'W503', 'E711', 'E128', 'E226',
|
||||||
'E126', 'E121', 'E122', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303',
|
'E126', 'E121', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303',
|
||||||
'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E731', 'E302', 'E129',
|
'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E731', 'E302', 'E129',
|
||||||
'E741', 'E714', 'W391', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306',
|
'E741', 'E714', 'W391', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ cache_fillers = {
|
|||||||
'client': (lambda: Client.objects.select_related().all(), client_cache_items, 3600*24*7, 10000),
|
'client': (lambda: Client.objects.select_related().all(), client_cache_items, 3600*24*7, 10000),
|
||||||
'recipient': (lambda: Recipient.objects.select_related().all(), recipient_cache_items, 3600*24*7, 10000),
|
'recipient': (lambda: Recipient.objects.select_related().all(), recipient_cache_items, 3600*24*7, 10000),
|
||||||
'stream': (lambda: Stream.objects.select_related().all(), stream_cache_items, 3600*24*7, 10000),
|
'stream': (lambda: Stream.objects.select_related().all(), stream_cache_items, 3600*24*7, 10000),
|
||||||
### Message cache fetching disabled until we can fix the fact that it
|
# Message cache fetching disabled until we can fix the fact that it
|
||||||
### does a bunch of inefficient memcached queries as part of filling
|
# does a bunch of inefficient memcached queries as part of filling
|
||||||
### the display_recipient cache
|
# the display_recipient cache
|
||||||
# 'message': (message_fetch_objects, message_cache_items, 3600 * 24, 1000),
|
# 'message': (message_fetch_objects, message_cache_items, 3600 * 24, 1000),
|
||||||
'huddle': (lambda: Huddle.objects.select_related().all(), huddle_cache_items, 3600*24*7, 10000),
|
'huddle': (lambda: Huddle.objects.select_related().all(), huddle_cache_items, 3600*24*7, 10000),
|
||||||
'session': (lambda: Session.objects.all(), session_cache_items, 3600*24*7, 10000),
|
'session': (lambda: Session.objects.all(), session_cache_items, 3600*24*7, 10000),
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ def gather_hot_conversations(user_profile, stream_messages):
|
|||||||
|
|
||||||
teaser_data = {"participants": users,
|
teaser_data = {"participants": users,
|
||||||
"count": count - len(first_few_messages),
|
"count": count - len(first_few_messages),
|
||||||
"first_few_messages": build_message_list(user_profile,
|
"first_few_messages": build_message_list(
|
||||||
first_few_messages)}
|
user_profile, first_few_messages)}
|
||||||
|
|
||||||
hot_conversation_render_payloads.append(teaser_data)
|
hot_conversation_render_payloads.append(teaser_data)
|
||||||
return hot_conversation_render_payloads
|
return hot_conversation_render_payloads
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ VALID_DIGEST_DAYS = (1, 2, 3, 4)
|
|||||||
def inactive_since(user_profile, cutoff):
|
def inactive_since(user_profile, cutoff):
|
||||||
# type: (UserProfile, datetime.datetime) -> bool
|
# type: (UserProfile, datetime.datetime) -> bool
|
||||||
# Hasn't used the app in the last 24 business-day hours.
|
# Hasn't used the app in the last 24 business-day hours.
|
||||||
most_recent_visit = [row.last_visit for row in \
|
most_recent_visit = [row.last_visit for row in
|
||||||
UserActivity.objects.filter(
|
UserActivity.objects.filter(
|
||||||
user_profile=user_profile)]
|
user_profile=user_profile)]
|
||||||
|
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ def accounts_home(request):
|
|||||||
|
|
||||||
def approximate_unread_count(user_profile):
|
def approximate_unread_count(user_profile):
|
||||||
# type: (UserProfile) -> int
|
# type: (UserProfile) -> int
|
||||||
not_in_home_view_recipients = [sub.recipient.id for sub in \
|
not_in_home_view_recipients = [sub.recipient.id for sub in
|
||||||
Subscription.objects.filter(
|
Subscription.objects.filter(
|
||||||
user_profile=user_profile, in_home_view=False)]
|
user_profile=user_profile, in_home_view=False)]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user