mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	pep8: Fix E231.
This commit is contained in:
		@@ -85,7 +85,7 @@ def check_pep8(files):
 | 
			
		||||
        'E402', 'E501', 'W503', 'E711', 'E201', 'E203', 'E202', 'E128', 'E226', 'E124', 'E125',
 | 
			
		||||
        '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', 'E231',
 | 
			
		||||
        'E741', 'E714', 'W391', 'E211', 'E713', 'E502', 'E131', 'E305', 'E251', 'E306',
 | 
			
		||||
    ]
 | 
			
		||||
    pep8 = subprocess.Popen(
 | 
			
		||||
        ['pycodestyle'] + files + ['--ignore={rules}'.format(rules=','.join(ignored_rules))],
 | 
			
		||||
@@ -339,7 +339,7 @@ def build_custom_checkers(by_lang):
 | 
			
		||||
        {'pattern': '^[ ][ ][a-zA-Z0-9]',
 | 
			
		||||
         'description': "Incorrect 2-space indentation in CSS",
 | 
			
		||||
         'exclude': set(['static/styles/thirdparty-fonts.css']),
 | 
			
		||||
         'strip': '\n',},
 | 
			
		||||
         'strip': '\n'},
 | 
			
		||||
        {'pattern': '{\w',
 | 
			
		||||
         'description': "Missing whitespace after '{' in CSS (should be newline)."},
 | 
			
		||||
        ]) + whitespace_rules # type: RuleList
 | 
			
		||||
 
 | 
			
		||||
@@ -104,7 +104,7 @@ class HomepageForm(forms.Form):
 | 
			
		||||
    # This form is important because it determines whether users can
 | 
			
		||||
    # register for our product. Be careful when modifying the
 | 
			
		||||
    # validators.
 | 
			
		||||
    email = forms.EmailField(validators=[is_inactive,])
 | 
			
		||||
    email = forms.EmailField(validators=[is_inactive])
 | 
			
		||||
 | 
			
		||||
    def __init__(self, *args, **kwargs):
 | 
			
		||||
        # type: (*Any, **Any) -> None
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,7 @@ def get_display_recipient_remote_cache(recipient_id, recipient_type, recipient_t
 | 
			
		||||
             'full_name': user_profile.full_name,
 | 
			
		||||
             'short_name': user_profile.short_name,
 | 
			
		||||
             'id': user_profile.id,
 | 
			
		||||
             'is_mirror_dummy': user_profile.is_mirror_dummy,} for user_profile in user_profile_list]
 | 
			
		||||
             'is_mirror_dummy': user_profile.is_mirror_dummy} for user_profile in user_profile_list]
 | 
			
		||||
 | 
			
		||||
def get_realm_emoji_cache_key(realm):
 | 
			
		||||
    # type: (Realm) -> Text
 | 
			
		||||
 
 | 
			
		||||
@@ -964,7 +964,7 @@ class EventQueueTest(TestCase):
 | 
			
		||||
        queue.push({"type": "restart", "server_generation": "2"})
 | 
			
		||||
        self.assertEqual(queue.contents(),
 | 
			
		||||
                         [{"type": "unknown",
 | 
			
		||||
                           "id": 9,},
 | 
			
		||||
                           "id": 9},
 | 
			
		||||
                          {'id': 19,
 | 
			
		||||
                           'type': 'pointer',
 | 
			
		||||
                           "pointer": 19,
 | 
			
		||||
@@ -978,7 +978,7 @@ class EventQueueTest(TestCase):
 | 
			
		||||
                        "timestamp": str(pointer_val)})
 | 
			
		||||
        self.assertEqual(queue.contents(),
 | 
			
		||||
                         [{"type": "unknown",
 | 
			
		||||
                           "id": 9,},
 | 
			
		||||
                           "id": 9},
 | 
			
		||||
                          {'id': 19,
 | 
			
		||||
                           'type': 'pointer',
 | 
			
		||||
                           "pointer": 19,
 | 
			
		||||
 
 | 
			
		||||
@@ -484,7 +484,7 @@ class StreamMessagesTest(ZulipTestCase):
 | 
			
		||||
                                                       "client": "test suite",
 | 
			
		||||
                                                       "subject": "announcement",
 | 
			
		||||
                                                       "content": "Everyone knows Iago rules",
 | 
			
		||||
                                                       "forged": "true",},
 | 
			
		||||
                                                       "forged": "true"},
 | 
			
		||||
                                  **self.api_auth(email))
 | 
			
		||||
        self.assert_json_error(result, "User not authorized for this query")
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@ class PublicURLTest(ZulipTestCase):
 | 
			
		||||
                          "/json/messages",
 | 
			
		||||
                          "/api/v1/streams",
 | 
			
		||||
                          ],
 | 
			
		||||
                    404: ["/help/nonexistent",],
 | 
			
		||||
                    404: ["/help/nonexistent"],
 | 
			
		||||
                }
 | 
			
		||||
        post_urls = {200: ["/accounts/login/"],
 | 
			
		||||
                     302: ["/accounts/logout/"],
 | 
			
		||||
 
 | 
			
		||||
@@ -298,7 +298,7 @@ def get_members_backend(request, user_profile):
 | 
			
		||||
                  "is_active": profile.is_active,
 | 
			
		||||
                  "is_admin": (profile in admins),
 | 
			
		||||
                  "email": profile.email,
 | 
			
		||||
                  "avatar_url": avatar_url,}
 | 
			
		||||
                  "avatar_url": avatar_url}
 | 
			
		||||
        if profile.is_bot and profile.bot_owner is not None:
 | 
			
		||||
            member["bot_owner"] = profile.bot_owner.email
 | 
			
		||||
        members.append(member)
 | 
			
		||||
 
 | 
			
		||||
@@ -142,7 +142,7 @@ def api_jira_webhook(request, user_profile, client,
 | 
			
		||||
        else:
 | 
			
		||||
            assignee_blurb = ''
 | 
			
		||||
        content = "%s **updated** %s%s:\n\n" % (author, issue, assignee_blurb)
 | 
			
		||||
        changelog = get_in(payload, ['changelog',])
 | 
			
		||||
        changelog = get_in(payload, ['changelog'])
 | 
			
		||||
        comment = get_in(payload, ['comment', 'body'])
 | 
			
		||||
 | 
			
		||||
        if changelog != '':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user