mirror of https://github.com/zulip/zulip.git
pep8: fix E201 violations
This commit is contained in:
parent
7e14fe65ab
commit
62494eeb97
|
@ -386,10 +386,10 @@ def process_notice(notice, log):
|
||||||
if options.forward_class_messages and notice.opcode.lower() == "crypt":
|
if options.forward_class_messages and notice.opcode.lower() == "crypt":
|
||||||
body = decrypt_zephyr(zephyr_class, notice.instance.lower(), body)
|
body = decrypt_zephyr(zephyr_class, notice.instance.lower(), body)
|
||||||
|
|
||||||
zeph = { 'time': str(notice.time),
|
zeph = {'time': str(notice.time),
|
||||||
'sender': notice.sender,
|
'sender': notice.sender,
|
||||||
'zsig': zsig, # logged here but not used by app
|
'zsig': zsig, # logged here but not used by app
|
||||||
'content': body}
|
'content': body}
|
||||||
if is_huddle:
|
if is_huddle:
|
||||||
zeph['type'] = 'private'
|
zeph['type'] = 'private'
|
||||||
zeph['recipient'] = huddle_recipients
|
zeph['recipient'] = huddle_recipients
|
||||||
|
|
|
@ -82,7 +82,7 @@ def check_pep8(files):
|
||||||
# type: (List[str]) -> bool
|
# type: (List[str]) -> bool
|
||||||
failed = False
|
failed = False
|
||||||
ignored_rules = [
|
ignored_rules = [
|
||||||
'E402', 'E501', 'W503', 'E711', 'E201', 'E128', 'E226',
|
'E402', 'E501', 'W503', 'E711', 'E128', 'E226',
|
||||||
'E126', 'E121', 'E122', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303',
|
'E126', 'E121', 'E122', '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',
|
||||||
|
|
|
@ -29,7 +29,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
if args.coverage:
|
if args.coverage:
|
||||||
import coverage
|
import coverage
|
||||||
cov = coverage.Coverage(branch=True, omit=[ "*/zulip-venv-cache/*", dir_join(tools_test_dir, "*")])
|
cov = coverage.Coverage(branch=True, omit=["*/zulip-venv-cache/*", dir_join(tools_test_dir, "*")])
|
||||||
cov.start()
|
cov.start()
|
||||||
|
|
||||||
suite = loader.discover(start_dir=tools_test_dir, top_level_dir=root_dir)
|
suite = loader.discover(start_dir=tools_test_dir, top_level_dir=root_dir)
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ class EditMessageTest(ZulipTestCase):
|
||||||
# type: (int, text_type, bool) -> None
|
# type: (int, text_type, bool) -> None
|
||||||
new_subject = 'subject' + unique_str
|
new_subject = 'subject' + unique_str
|
||||||
new_content = 'content' + unique_str
|
new_content = 'content' + unique_str
|
||||||
params_dict = { 'message_id': id_, 'subject': new_subject}
|
params_dict = {'message_id': id_, 'subject': new_subject}
|
||||||
if not topic_only:
|
if not topic_only:
|
||||||
params_dict['content'] = new_content
|
params_dict['content'] = new_content
|
||||||
result = self.client_post("/json/update_message", params_dict)
|
result = self.client_post("/json/update_message", params_dict)
|
||||||
|
@ -1023,7 +1023,7 @@ class EditMessageTest(ZulipTestCase):
|
||||||
old_content = message.content
|
old_content = message.content
|
||||||
new_subject = 'subject' + unique_str
|
new_subject = 'subject' + unique_str
|
||||||
new_content = 'content' + unique_str
|
new_content = 'content' + unique_str
|
||||||
params_dict = { 'message_id': id_, 'subject': new_subject}
|
params_dict = {'message_id': id_, 'subject': new_subject}
|
||||||
if not topic_only:
|
if not topic_only:
|
||||||
params_dict['content'] = new_content
|
params_dict['content'] = new_content
|
||||||
result = self.client_post("/json/update_message", params_dict)
|
result = self.client_post("/json/update_message", params_dict)
|
||||||
|
|
Loading…
Reference in New Issue