From ca09c1e0fde873264a319080aa996edfd1817cdf Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 12 Dec 2017 17:45:43 -0800 Subject: [PATCH] templates: Revert change to Python 3 typing syntax in examples. This reverts commit 5a1869901. I reviewed this change and decided not to merge it yet, but then I did anyway <_< >_>, along with some others in the same PR. --- templates/zerver/api/writing-bots.md | 10 +++++----- templates/zerver/markdown_help.html | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/zerver/api/writing-bots.md b/templates/zerver/api/writing-bots.md index 90e335549b..92776cd8c8 100644 --- a/templates/zerver/api/writing-bots.md +++ b/templates/zerver/api/writing-bots.md @@ -56,10 +56,10 @@ class MyBotHandler(object): A docstring documenting this bot. ''' - def usage(self) -> str: + def usage(self): return '''Your description of the bot''' - def handle_message(self, message, bot_handler) -> None: + def handle_message(self, message, bot_handler): # add your code here handler_class = MyBotHandler @@ -176,7 +176,7 @@ is called to retrieve information about the bot. #### Example implementation ``` -def usage(self) -> str: +def usage(self): return ''' This plugin will allow users to flag messages as being follow-up items. Users should preface @@ -207,7 +207,7 @@ None. #### Example implementation ``` - def handle_message(self, message, bot_handler) -> None: + def handle_message(self, message, bot_handler): original_content = message['content'] original_sender = message['sender_email'] new_content = original_content.replace('@followup', @@ -408,7 +408,7 @@ refactor them. class TestHelloWorldBot(BotTestCase): bot_name = "helloworld" # The bot's name (should be the name of the bot module to test). - def test_bot(self) -> None: # A test case (must start with `test`) + def test_bot(self): # A test case (must start with `test`) # Messages we want to test and the expected bot responses. message_response_pairs = [("", "beep boop"), ("foo", "beep boop"), diff --git a/templates/zerver/markdown_help.html b/templates/zerver/markdown_help.html index 467ef97195..1a97a57283 100644 --- a/templates/zerver/markdown_help.html +++ b/templates/zerver/markdown_help.html @@ -77,16 +77,16 @@ ``` -def zulip() -> None: - print("Zulip") +def zulip(): + print "Zulip" ``` -
def zulip() -> None:
-    print("Zulip")
+
def zulip():
+    print "Zulip"
```python -def zulip() -> None: - print("Zulip") +def zulip(): + print "Zulip" ```
def zulip():