mirror of https://github.com/zulip/zulip.git
pep8: Fix E128 violations.
With some line-wrapping tweaks by tabbott.
This commit is contained in:
parent
fae59502ab
commit
94b28e0afb
|
@ -322,28 +322,28 @@ def config_error(msg):
|
|||
sys.exit(2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = optparse.OptionParser(epilog=
|
||||
'''Most general and Jabber configuration options may also be specified in the
|
||||
parser = optparse.OptionParser(
|
||||
epilog='''Most general and Jabber configuration options may also be specified in the
|
||||
zulip configuration file under the jabber_mirror section (exceptions are noted
|
||||
in their help sections). Keys have the same name as options with hyphens
|
||||
replaced with underscores. Zulip configuration options go in the api section,
|
||||
as normal.'''.replace("\n", " ")
|
||||
)
|
||||
parser.add_option('--mode',
|
||||
parser.add_option(
|
||||
'--mode',
|
||||
default=None,
|
||||
action='store',
|
||||
help=
|
||||
'''Which mode to run in. Valid options are "personal" and "public". In
|
||||
help='''Which mode to run in. Valid options are "personal" and "public". In
|
||||
"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
|
||||
Zulip. In "public" mode, the mirror uses the credentials for a dedicated mirror
|
||||
user and mirrors messages sent to Jabber rooms to Zulip. Defaults to
|
||||
"personal"'''.replace("\n", " "))
|
||||
parser.add_option('--zulip-email-suffix',
|
||||
parser.add_option(
|
||||
'--zulip-email-suffix',
|
||||
default=None,
|
||||
action='store',
|
||||
help=
|
||||
'''Add the specified suffix to the local part of email addresses constructed
|
||||
help='''Add the specified suffix to the local part of email addresses constructed
|
||||
from JIDs and nicks before sending requests to the Zulip server, and remove the
|
||||
suffix before sending requests to the Jabber server. For example, specifying
|
||||
"+foo" will cause messages that are sent to the "bar" room by nickname "qux" to
|
||||
|
@ -357,7 +357,8 @@ option does not affect login credentials.'''.replace("\n", " "))
|
|||
default=logging.INFO)
|
||||
|
||||
jabber_group = optparse.OptionGroup(parser, "Jabber configuration")
|
||||
jabber_group.add_option('--jid',
|
||||
jabber_group.add_option(
|
||||
'--jid',
|
||||
default=None,
|
||||
action='store',
|
||||
help="Your Jabber JID. If a resource is specified, "
|
||||
|
|
|
@ -82,7 +82,7 @@ def check_pep8(files):
|
|||
# type: (List[str]) -> bool
|
||||
failed = False
|
||||
ignored_rules = [
|
||||
'E402', 'E501', 'W503', 'E711', 'E128', 'E226',
|
||||
'E402', 'E501', 'W503', 'E711', 'E226',
|
||||
'E126', 'E121', 'E123', 'E266', 'E265', 'E261', 'E221',
|
||||
'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E731', 'E302',
|
||||
'E741', 'E714', 'W391', 'E713', 'E305', 'E251', 'E306',
|
||||
|
@ -460,8 +460,10 @@ def run():
|
|||
print('If you really know what you are doing, use --force to run anyway.')
|
||||
sys.exit(1)
|
||||
|
||||
by_lang = cast(Dict[str, List[str]], lister.list_files(args, modified_only=options.modified,
|
||||
ftypes=['py', 'sh', 'js', 'pp', 'css', 'handlebars', 'html', 'json', 'md', 'txt', 'text'],
|
||||
by_lang = cast(Dict[str, List[str]],
|
||||
lister.list_files(args, modified_only=options.modified,
|
||||
ftypes=['py', 'sh', 'js', 'pp', 'css', 'handlebars',
|
||||
'html', 'json', 'md', 'txt', 'text'],
|
||||
use_shebang=True, group_by_ftype=True, exclude=EXCLUDED_FILES))
|
||||
|
||||
# Invoke the appropriate lint checker for each language,
|
||||
|
|
|
@ -227,14 +227,19 @@ def send_signup_message(sender, signups_stream, user_profile,
|
|||
# Send notification to realm notifications stream if it exists
|
||||
# Don't send notification for the first user in a realm
|
||||
if user_profile.realm.notifications_stream is not None and user_count > 1:
|
||||
internal_send_message(sender, "stream",
|
||||
internal_send_message(
|
||||
sender,
|
||||
"stream",
|
||||
user_profile.realm.notifications_stream.name,
|
||||
"New users", "%s just signed up for Zulip. Say hello!" %
|
||||
(user_profile.full_name,),
|
||||
"New users", "%s just signed up for Zulip. Say hello!" % (
|
||||
user_profile.full_name,),
|
||||
realm=user_profile.realm)
|
||||
|
||||
internal_send_message(sender,
|
||||
"stream", signups_stream, user_profile.realm.domain,
|
||||
internal_send_message(
|
||||
sender,
|
||||
"stream",
|
||||
signups_stream,
|
||||
user_profile.realm.domain,
|
||||
"%s <`%s`> just signed up for Zulip!%s(total: **%i**)" % (
|
||||
user_profile.full_name,
|
||||
user_profile.email,
|
||||
|
@ -303,8 +308,11 @@ def process_new_human_user(user_profile, prereg_user=None, newsletter_data=None)
|
|||
if not mit_beta_user and prereg_user is not None and prereg_user.referred_by is not None \
|
||||
and settings.NOTIFICATION_BOT is not None:
|
||||
# This is a cross-realm private message.
|
||||
internal_send_message(settings.NOTIFICATION_BOT,
|
||||
"private", prereg_user.referred_by.email, user_profile.realm.domain,
|
||||
internal_send_message(
|
||||
settings.NOTIFICATION_BOT,
|
||||
"private",
|
||||
prereg_user.referred_by.email,
|
||||
user_profile.realm.domain,
|
||||
"%s <`%s`> accepted your invitation to join Zulip!" % (
|
||||
user_profile.full_name,
|
||||
user_profile.email,
|
||||
|
|
|
@ -63,7 +63,8 @@ def api_pivotal_webhook_v3(request, user_profile, stream):
|
|||
if estimate != '':
|
||||
estimate = " worth %s story points" % (estimate,)
|
||||
subject = name
|
||||
content = "%s (%s %s%s):\n\n~~~ quote\n%s\n~~~\n\n%s" % (description,
|
||||
content = "%s (%s %s%s):\n\n~~~ quote\n%s\n~~~\n\n%s" % (
|
||||
description,
|
||||
issue_status,
|
||||
issue_type,
|
||||
estimate,
|
||||
|
|
Loading…
Reference in New Issue