mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 02:23:57 +00:00
mypy: Use Python 3 type syntax in zerver/webhooks/helloworld/view.py.
This commit is contained in:
@@ -13,10 +13,10 @@ from zerver.models import UserProfile
|
|||||||
|
|
||||||
@api_key_only_webhook_view('HelloWorld')
|
@api_key_only_webhook_view('HelloWorld')
|
||||||
@has_request_variables
|
@has_request_variables
|
||||||
def api_helloworld_webhook(request, user_profile,
|
def api_helloworld_webhook(request: HttpRequest, user_profile: UserProfile,
|
||||||
payload=REQ(argument_type='body'), stream=REQ(default='test'),
|
payload: Dict[str, Iterable[Dict[str, Any]]]=REQ(argument_type='body'),
|
||||||
topic=REQ(default='Hello World')):
|
stream: Text=REQ(default='test'),
|
||||||
# type: (HttpRequest, UserProfile, Dict[str, Iterable[Dict[str, Any]]], Text, Optional[Text]) -> HttpResponse
|
topic: Optional[Text]=REQ(default='Hello World')) -> HttpResponse:
|
||||||
|
|
||||||
# construct the body of the message
|
# construct the body of the message
|
||||||
body = 'Hello! I am happy to be here! :smile:'
|
body = 'Hello! I am happy to be here! :smile:'
|
||||||
|
|||||||
Reference in New Issue
Block a user