mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
lint: Fix E703 pep8 violations.
This commit is contained in:
@@ -299,7 +299,7 @@ def run_mirror():
|
||||
time.sleep(sleepInterval)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
open(config.RESUME_FILE, 'w').write(since.strftime("%s"));
|
||||
open(config.RESUME_FILE, 'w').write(since.strftime("%s"))
|
||||
logging.info("Shutting down Codebase mirror")
|
||||
|
||||
# void function that checks the permissions of the files this script needs.
|
||||
|
||||
@@ -86,7 +86,7 @@ def check_pep8(files):
|
||||
'E126', 'E127', 'E121', 'E122', 'E123', 'E266', 'E265', 'E261', 'E301', 'E221', 'E303',
|
||||
'E241', 'E712', 'E225', 'E401', 'E115', 'E114', 'E111', 'E222', 'E731', 'E302', 'E129',
|
||||
'E741', 'E714', 'W391', 'E211', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306', 'E231',
|
||||
'E701', 'E702', 'E703',
|
||||
'E701', 'E702',
|
||||
]
|
||||
pep8 = subprocess.Popen(
|
||||
['pycodestyle'] + files + ['--ignore={rules}'.format(rules=','.join(ignored_rules))],
|
||||
|
||||
@@ -572,7 +572,7 @@ def do_deactivate_user(user_profile, log=True, _cascade=True):
|
||||
if not user_profile.is_active:
|
||||
return
|
||||
|
||||
user_profile.is_active = False;
|
||||
user_profile.is_active = False
|
||||
user_profile.save(update_fields=["is_active"])
|
||||
|
||||
delete_user_sessions(user_profile)
|
||||
@@ -2623,7 +2623,7 @@ def do_update_message(user_profile, message, subject, propagate_mode, content, r
|
||||
if propagate_mode == 'change_later':
|
||||
propagate_query = propagate_query & Q(id__gt = message.id)
|
||||
|
||||
messages = Message.objects.filter(propagate_query).select_related();
|
||||
messages = Message.objects.filter(propagate_query).select_related()
|
||||
|
||||
# Evaluate the query before running the update
|
||||
messages_list = list(messages)
|
||||
|
||||
@@ -152,7 +152,7 @@ class SimpleQueueClient(object):
|
||||
(meta, _, message) = self.channel.basic_get(queue_name)
|
||||
|
||||
if not message:
|
||||
break;
|
||||
break
|
||||
|
||||
self.channel.basic_ack(meta.delivery_tag)
|
||||
if json:
|
||||
|
||||
@@ -73,7 +73,7 @@ def run_in_batches(all_list, batch_size, callback, sleep_time = 0, logger = None
|
||||
if len(all_list) == 0:
|
||||
return
|
||||
|
||||
limit = (len(all_list) // batch_size) + 1;
|
||||
limit = (len(all_list) // batch_size) + 1
|
||||
for i in range(limit):
|
||||
start = i*batch_size
|
||||
end = (i+1) * batch_size
|
||||
|
||||
@@ -10,8 +10,8 @@ class HelloWorldHookTests(WebhookTestCase):
|
||||
# Note: Include a test function per each distinct message condition your integration supports
|
||||
def test_hello_message(self):
|
||||
# type: () -> None
|
||||
expected_subject = u"Hello World";
|
||||
expected_message = u"Hello! I am happy to be here! :smile:\nThe Wikipedia featured article for today is **[Marilyn Monroe](https://en.wikipedia.org/wiki/Marilyn_Monroe)**";
|
||||
expected_subject = u"Hello World"
|
||||
expected_message = u"Hello! I am happy to be here! :smile:\nThe Wikipedia featured article for today is **[Marilyn Monroe](https://en.wikipedia.org/wiki/Marilyn_Monroe)**"
|
||||
|
||||
# use fixture named helloworld_hello
|
||||
self.send_and_test_stream_message('hello', expected_subject, expected_message,
|
||||
@@ -19,8 +19,8 @@ class HelloWorldHookTests(WebhookTestCase):
|
||||
|
||||
def test_goodbye_message(self):
|
||||
# type: () -> None
|
||||
expected_subject = u"Hello World";
|
||||
expected_message = u"Hello! I am happy to be here! :smile:\nThe Wikipedia featured article for today is **[Goodbye](https://en.wikipedia.org/wiki/Goodbye)**";
|
||||
expected_subject = u"Hello World"
|
||||
expected_message = u"Hello! I am happy to be here! :smile:\nThe Wikipedia featured article for today is **[Goodbye](https://en.wikipedia.org/wiki/Goodbye)**"
|
||||
|
||||
# use fixture named helloworld_goodbye
|
||||
self.send_and_test_stream_message('goodbye', expected_subject, expected_message,
|
||||
|
||||
@@ -92,7 +92,7 @@ def json_refer_friend(request, user_profile, email=REQ()):
|
||||
if user_profile.invites_granted - user_profile.invites_used <= 0:
|
||||
return json_error(_("Insufficient invites"))
|
||||
|
||||
do_refer_friend(user_profile, email);
|
||||
do_refer_friend(user_profile, email)
|
||||
|
||||
return json_success()
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ class MessageSenderWorker(QueueProcessingWorker):
|
||||
|
||||
redis_key = req_redis_key(event['req_id'])
|
||||
self.redis_client.hmset(redis_key, {'status': 'complete',
|
||||
'response': resp_content});
|
||||
'response': resp_content})
|
||||
|
||||
queue_json_publish(server_meta['return_queue'], result, lambda e: None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user