mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 14:38:46 +00:00
tools: Upgrade Pycodestyle and fix new linter errors.
Here, we are upgrading pycodestyle version from 2.4.0 to 2.5.0. Fixes: #11396.
This commit is contained in:
committed by
Tim Abbott
parent
07bac66db7
commit
e1772b3b8f
@@ -26,7 +26,7 @@ httpretty==0.9.6
|
|||||||
isort==4.3.4
|
isort==4.3.4
|
||||||
|
|
||||||
# for pep8 linter
|
# for pep8 linter
|
||||||
pycodestyle==2.4.0
|
pycodestyle==2.5.0
|
||||||
|
|
||||||
# Needed to run pyflakes linter
|
# Needed to run pyflakes linter
|
||||||
pyflakes==2.0.0
|
pyflakes==2.0.0
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ py3dns==3.2.0
|
|||||||
pyaml==18.11.0 # via moto
|
pyaml==18.11.0 # via moto
|
||||||
pyasn1-modules==0.2.4
|
pyasn1-modules==0.2.4
|
||||||
pyasn1==0.4.5
|
pyasn1==0.4.5
|
||||||
pycodestyle==2.4.0
|
pycodestyle==2.5.0
|
||||||
pycparser==2.19 # via cffi
|
pycparser==2.19 # via cffi
|
||||||
pycrypto==2.6.1
|
pycrypto==2.6.1
|
||||||
pycryptodome==3.7.3 # via python-jose
|
pycryptodome==3.7.3 # via python-jose
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2018/11/07/zulip-1-9-relea
|
|||||||
# Typically, adding a dependency only requires a minor version bump, and
|
# Typically, adding a dependency only requires a minor version bump, and
|
||||||
# removing a dependency requires a major version bump.
|
# removing a dependency requires a major version bump.
|
||||||
|
|
||||||
PROVISION_VERSION = '27.4'
|
PROVISION_VERSION = '27.5'
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ def rm_tree(path: str) -> None:
|
|||||||
|
|
||||||
def slack_workspace_to_realm(domain_name: str, realm_id: int, user_list: List[ZerverFieldsT],
|
def slack_workspace_to_realm(domain_name: str, realm_id: int, user_list: List[ZerverFieldsT],
|
||||||
realm_subdomain: str, slack_data_dir: str,
|
realm_subdomain: str, slack_data_dir: str,
|
||||||
custom_emoji_list: ZerverFieldsT)-> Tuple[ZerverFieldsT, AddedUsersT,
|
custom_emoji_list: ZerverFieldsT) -> Tuple[ZerverFieldsT, AddedUsersT,
|
||||||
AddedRecipientsT,
|
AddedRecipientsT,
|
||||||
AddedChannelsT,
|
AddedChannelsT,
|
||||||
List[ZerverFieldsT],
|
List[ZerverFieldsT],
|
||||||
|
|||||||
@@ -720,7 +720,7 @@ class WebhookTestCase(ZulipTestCase):
|
|||||||
|
|
||||||
def send_and_test_private_message(self, fixture_name: str, expected_topic: str=None,
|
def send_and_test_private_message(self, fixture_name: str, expected_topic: str=None,
|
||||||
expected_message: str=None, content_type: str="application/json",
|
expected_message: str=None, content_type: str="application/json",
|
||||||
**kwargs: Any)-> Message:
|
**kwargs: Any) -> Message:
|
||||||
payload = self.get_body(fixture_name)
|
payload = self.get_body(fixture_name)
|
||||||
if content_type is not None:
|
if content_type is not None:
|
||||||
kwargs['content_type'] = content_type
|
kwargs['content_type'] = content_type
|
||||||
|
|||||||
@@ -1820,7 +1820,7 @@ class MessagePOSTTest(ZulipTestCase):
|
|||||||
# to ANY stream, even one she is not unsubscribed to, and
|
# to ANY stream, even one she is not unsubscribed to, and
|
||||||
# she can do it for herself or on behalf of a mirrored user.
|
# she can do it for herself or on behalf of a mirrored user.
|
||||||
|
|
||||||
def test_with(sender_email: str, client: str, forged: bool) ->None:
|
def test_with(sender_email: str, client: str, forged: bool) -> None:
|
||||||
payload = dict(
|
payload = dict(
|
||||||
type="stream",
|
type="stream",
|
||||||
to=stream_name,
|
to=stream_name,
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class WebhooksCommonTestCase(ZulipTestCase):
|
|||||||
self.assertEqual(msg.sender.email, notification_bot.email)
|
self.assertEqual(msg.sender.email, notification_bot.email)
|
||||||
self.assertEqual(msg.content, expected_message)
|
self.assertEqual(msg.content, expected_message)
|
||||||
|
|
||||||
def test_notify_bot_owner_on_invalid_json(self)-> None:
|
def test_notify_bot_owner_on_invalid_json(self) -> None:
|
||||||
@api_key_only_webhook_view('ClientName', notify_bot_owner_on_invalid_json=False)
|
@api_key_only_webhook_view('ClientName', notify_bot_owner_on_invalid_json=False)
|
||||||
def my_webhook_no_notify(request: HttpRequest, user_profile: UserProfile) -> None:
|
def my_webhook_no_notify(request: HttpRequest, user_profile: UserProfile) -> None:
|
||||||
raise InvalidJSONError("Malformed JSON")
|
raise InvalidJSONError("Malformed JSON")
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from zerver.models import Stream, UserProfile
|
|||||||
def api_newrelic_webhook(request: HttpRequest, user_profile: UserProfile,
|
def api_newrelic_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||||
alert: Optional[Dict[str, Any]]=REQ(validator=check_dict([]), default=None),
|
alert: Optional[Dict[str, Any]]=REQ(validator=check_dict([]), default=None),
|
||||||
deployment: Optional[Dict[str, Any]]=REQ(validator=check_dict([]), default=None)
|
deployment: Optional[Dict[str, Any]]=REQ(validator=check_dict([]), default=None)
|
||||||
)-> HttpResponse:
|
) -> HttpResponse:
|
||||||
if alert:
|
if alert:
|
||||||
# Use the message as the subject because it stays the same for
|
# Use the message as the subject because it stays the same for
|
||||||
# "opened", "acknowledged", and "closed" messages that should be
|
# "opened", "acknowledged", and "closed" messages that should be
|
||||||
|
|||||||
Reference in New Issue
Block a user