mirror of https://github.com/zulip/zulip.git
pep8: Fix E125.
This commit is contained in:
parent
e009383460
commit
6b0df43463
|
@ -82,7 +82,7 @@ def check_pep8(files):
|
|||
# type: (List[str]) -> bool
|
||||
failed = False
|
||||
ignored_rules = [
|
||||
'E402', 'E501', 'W503', 'E711', 'E201', 'E203', 'E202', 'E128', 'E226', 'E124', 'E125',
|
||||
'E402', 'E501', 'W503', 'E711', 'E201', 'E203', 'E202', 'E128', 'E226', 'E124',
|
||||
'E126', 'E127', 'E121', 'E122', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303',
|
||||
'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E111', 'E731', 'E302', 'E129',
|
||||
'E741', 'E714', 'W391', 'E211', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306',
|
||||
|
|
|
@ -816,8 +816,10 @@ class BugdownUListPreprocessor(markdown.preprocessors.Preprocessor):
|
|||
|
||||
# If we're not in a fenced block and we detect an upcoming list
|
||||
# hanging off a paragraph, add a newline
|
||||
if not fence and lines[i] and \
|
||||
self.LI_RE.match(lines[i+1]) and not self.LI_RE.match(lines[i]):
|
||||
if (not fence and lines[i] and
|
||||
self.LI_RE.match(lines[i+1]) and
|
||||
not self.LI_RE.match(lines[i])):
|
||||
|
||||
copy.insert(i+inserts+1, '')
|
||||
inserts += 1
|
||||
return copy
|
||||
|
|
|
@ -335,7 +335,8 @@ def flush_user_profile(sender, **kwargs):
|
|||
# Invalidate our active_users_in_realm info dict if any user has changed
|
||||
# the fields in the dict or become (in)active
|
||||
if kwargs.get('update_fields') is None or \
|
||||
len(set(active_user_dict_fields + ['is_active']) & set(kwargs['update_fields'])) > 0:
|
||||
len(set(active_user_dict_fields + ['is_active']) &
|
||||
set(kwargs['update_fields'])) > 0:
|
||||
cache_delete(active_user_dicts_in_realm_cache_key(user_profile.realm))
|
||||
|
||||
# Invalidate our active_bots_in_realm info dict if any bot has
|
||||
|
@ -399,4 +400,3 @@ def flush_message(sender, **kwargs):
|
|||
message = kwargs['instance']
|
||||
cache_delete(to_dict_cache_key(message, False))
|
||||
cache_delete(to_dict_cache_key(message, True))
|
||||
|
||||
|
|
|
@ -98,8 +98,7 @@ def is_template_database_current(
|
|||
database_name='zulip_test_template',
|
||||
migration_status='var/migration-status',
|
||||
settings='zproject.test_settings',
|
||||
check_files=None
|
||||
):
|
||||
check_files=None):
|
||||
# type: (Optional[text_type], Optional[text_type], Optional[text_type], Optional[List[str]]) -> bool
|
||||
# Using str type for check_files because re.split doesn't accept unicode
|
||||
if check_files is None:
|
||||
|
|
|
@ -137,8 +137,7 @@ def upload_image_to_s3(
|
|||
file_name,
|
||||
content_type,
|
||||
user_profile,
|
||||
contents,
|
||||
):
|
||||
contents):
|
||||
# type: (NonBinaryStr, text_type, Optional[text_type], UserProfile, binary_type) -> None
|
||||
|
||||
conn = S3Connection(settings.S3_KEY, settings.S3_SECRET_KEY)
|
||||
|
|
|
@ -105,8 +105,9 @@ def json_time_setting(request, user_profile, twenty_four_hour_time=REQ(validator
|
|||
def json_left_side_userlist(request, user_profile, left_side_userlist=REQ(validator=check_bool, default=None)):
|
||||
# type: (HttpRequest, UserProfile, Optional[bool]) -> HttpResponse
|
||||
result = {}
|
||||
if left_side_userlist is not None and \
|
||||
user_profile.left_side_userlist != left_side_userlist:
|
||||
if (left_side_userlist is not None and \
|
||||
user_profile.left_side_userlist != left_side_userlist):
|
||||
|
||||
do_change_left_side_userlist(user_profile, left_side_userlist)
|
||||
|
||||
result['left_side_userlist'] = left_side_userlist
|
||||
|
|
|
@ -228,8 +228,10 @@ def add_bot_backend(request, user_profile, full_name=REQ(), short_name=REQ(),
|
|||
default_sending_stream = None
|
||||
if default_sending_stream_name is not None:
|
||||
default_sending_stream = stream_or_none(default_sending_stream_name, user_profile.realm)
|
||||
if default_sending_stream and not default_sending_stream.is_public() and not \
|
||||
subscribed_to_stream(user_profile, default_sending_stream):
|
||||
if (default_sending_stream and not
|
||||
default_sending_stream.is_public() and not \
|
||||
subscribed_to_stream(user_profile, default_sending_stream)):
|
||||
|
||||
return json_error(_('Insufficient permission'))
|
||||
|
||||
default_events_register_stream = None
|
||||
|
|
Loading…
Reference in New Issue