pep8: Fix E131.

This commit is contained in:
Alex Huang 2016-12-01 23:15:05 -08:00 committed by Tim Abbott
parent c8ddea16c3
commit 007b693cc7
8 changed files with 24 additions and 29 deletions

View File

@ -62,7 +62,7 @@ result = client.send_message(dict(
to = os.environ['ZULIP_STREAM'],
subject = 'build for ' + repo_name,
content = '%s [%s](%s)' %
(repo_name, os.environ['TDDIUM_BUILD_STATUS'], report_url)))
(repo_name, os.environ['TDDIUM_BUILD_STATUS'], report_url)))
if result['result'] != 'success':
sys.stderr.write('Error sending to Zulip:\n%s\n' % (result['msg'],))

View File

@ -86,7 +86,7 @@ def check_pep8(files):
'E402', 'E501', 'W503', 'E711', 'E128', 'E226',
'E126', 'E121', 'E123', 'E266', 'E265', 'E261', 'E221', 'E303',
'E241', 'E712', 'E702', 'E401', 'E115', 'E114', 'E731', 'E302', 'E129',
'E741', 'E714', 'W391', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306',
'E741', 'E714', 'W391', 'E713', 'E502', 'E305', 'E251', 'E306',
]
pep8 = subprocess.Popen(
['pycodestyle'] + files + ['--ignore={rules}'.format(rules=','.join(ignored_rules))],
@ -347,7 +347,7 @@ def build_custom_checkers(by_lang):
prose_style_rules = [
{'pattern': '[^\/\#\-\"]([jJ]avascript)', # exclude usage in hrefs/divs
'description': "javascript should be spelled JavaScript"},
{'pattern': '[^\/\-\.\"\'\_\=\>]([gG]ithub)[^\.\-\_\"\<]', # exclude usage in hrefs/divs
{'pattern': '[^\/\-\.\"\'\_\=\>]([gG]ithub)[^\.\-\_\"\<]', # exclude usage in hrefs/divs
'description': "github should be spelled GitHub"},
] # type: RuleList
html_rules = whitespace_rules + prose_style_rules + [

View File

@ -986,7 +986,7 @@ class Bugdown(markdown.Extension):
# define default configs
self.config = {
"realm_filters": [kwargs['realm_filters'], "Realm-specific filters for domain"],
"realm": [kwargs['realm'], "Realm name"]
"realm": [kwargs['realm'], "Realm name"]
}
super(Bugdown, self).__init__(*args, **kwargs)

View File

@ -179,8 +179,8 @@ def handle_digest_email(user_profile_id, cutoff):
# You can't have an unread message that you sent, but when testing
# this causes confusion so filter your messages out.
pms = all_messages.filter(
~Q(message__recipient__type=Recipient.STREAM) & \
~Q(message__sender=user_profile))
~Q(message__recipient__type=Recipient.STREAM) &
~Q(message__sender=user_profile))
# Show up to 4 missed PMs.
pms_limit = 4

View File

@ -51,7 +51,8 @@ class AdminZulipHandler(logging.Handler):
method = request.method,
path = request.path,
data = request.GET if request.method == 'GET'
else filter.get_post_parameters(request),
else
(filter.get_post_parameters(request)),
remote_addr = request.META.get('REMOTE_ADDR', None),
query_string = request.META.get('QUERY_STRING', None),
server_name = request.META.get('SERVER_NAME', None),

View File

@ -605,22 +605,16 @@ def home_real(request):
cross_realm_bots = list(get_cross_realm_dicts()),
# Stream message notification settings:
stream_desktop_notifications_enabled =
user_profile.enable_stream_desktop_notifications,
stream_desktop_notifications_enabled = user_profile.enable_stream_desktop_notifications,
stream_sounds_enabled = user_profile.enable_stream_sounds,
# Private message and @-mention notification settings:
desktop_notifications_enabled = desktop_notifications_enabled,
sounds_enabled =
user_profile.enable_sounds,
enable_offline_email_notifications =
user_profile.enable_offline_email_notifications,
enable_offline_push_notifications =
user_profile.enable_offline_push_notifications,
enable_online_push_notifications =
user_profile.enable_online_push_notifications,
sounds_enabled = user_profile.enable_sounds,
enable_offline_email_notifications = user_profile.enable_offline_email_notifications,
enable_offline_push_notifications = user_profile.enable_offline_push_notifications,
enable_online_push_notifications = user_profile.enable_online_push_notifications,
twenty_four_hour_time = register_ret['twenty_four_hour_time'],
enable_digest_emails = user_profile.enable_digest_emails,
event_queue_id = register_ret['queue_id'],
last_event_id = register_ret['last_event_id'],

View File

@ -130,4 +130,4 @@ def api_endpoint_docs(request):
'content': calls,
'langs': langs,
},
request=request)
request=request)

View File

@ -54,15 +54,15 @@ templates = {
'create': u':package: %(user)s created user story **%(subject)s**.',
'set_assigned_to': u':busts_in_silhouette: %(user)s assigned user story **%(subject)s** to %(new)s.',
'changed_assigned_to': u':busts_in_silhouette: %(user)s reassigned user story **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'points': u':game_die: %(user)s changed estimation of user story **%(subject)s**.',
'blocked': u':lock: %(user)s blocked user story **%(subject)s**.',
'unblocked': u':unlock: %(user)s unblocked user story **%(subject)s**.',
'set_milestone': u':calendar: %(user)s added user story **%(subject)s** to sprint %(new)s.',
'changed_milestone': u':calendar: %(user)s changed sprint of user story **%(subject)s** from %(old)s'
' to %(new)s.',
' to %(new)s.',
'changed_status': u':chart_with_upwards_trend: %(user)s changed status of user story **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'closed': u':checkered_flag: %(user)s closed user story **%(subject)s**.',
'reopened': u':package: %(user)s reopened user story **%(subject)s**.',
'renamed': u':notebook: %(user)s renamed user story from %(old)s to **%(new)s**.',
@ -74,22 +74,22 @@ templates = {
'create': u':calendar: %(user)s created sprint **%(subject)s**.',
'renamed': u':notebook: %(user)s renamed sprint from %(old)s to **%(new)s**.',
'estimated_start': u':calendar: %(user)s changed estimated start of sprint **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'estimated_finish': u':calendar: %(user)s changed estimated finish of sprint **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'delete': u':x: %(user)s deleted sprint **%(subject)s**.'
},
'task': {
'create': u':clipboard: %(user)s created task **%(subject)s**.',
'set_assigned_to': u':busts_in_silhouette: %(user)s assigned task **%(subject)s** to %(new)s.',
'changed_assigned_to': u':busts_in_silhouette: %(user)s reassigned task **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'blocked': u':lock: %(user)s blocked task **%(subject)s**.',
'unblocked': u':unlock: %(user)s unblocked task **%(subject)s**.',
'set_milestone': u':calendar: %(user)s added task **%(subject)s** to sprint %(new)s.',
'changed_milestone': u':calendar: %(user)s changed sprint of task **%(subject)s** from %(old)s to %(new)s.',
'changed_status': u':chart_with_upwards_trend: %(user)s changed status of task **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'renamed': u':notebook: %(user)s renamed task %(old)s to **%(new)s**.',
'description': u':notebook: %(user)s updated description of task **%(subject)s**.',
'commented': u':thought_balloon: %(user)s commented on task **%(subject)s**.',
@ -100,7 +100,7 @@ templates = {
'create': u':bulb: %(user)s created issue **%(subject)s**.',
'set_assigned_to': u':busts_in_silhouette: %(user)s assigned issue **%(subject)s** to %(new)s.', #
'changed_assigned_to': u':busts_in_silhouette: %(user)s reassigned issue **%(subject)s**'
' from %(old)s to %(new)s.',
' from %(old)s to %(new)s.',
'changed_priority': u':rocket: %(user)s changed priority of issue **%(subject)s** from %(old)s to %(new)s.',
'changed_severity': u':warning: %(user)s changed severity of issue **%(subject)s** from %(old)s to %(new)s.',
'changed_status': u':chart_with_upwards_trend: %(user)s changed status of issue **%(subject)s**'
@ -156,7 +156,7 @@ def parse_comment(message):
'values': {
'user': message["change"]["user"]["name"],
'subject': message["data"]["subject"] if "subject" in list(message["data"].keys()) else
message["data"]["name"]
(message["data"]["name"])
}
}
@ -170,7 +170,7 @@ def parse_create_or_delete(message):
{
'user': message["data"]["owner"]["name"],
'subject': message["data"]["subject"] if "subject" in list(message["data"].keys()) else
message["data"]["name"]
(message["data"]["name"])
}
}