File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
zulip_bots/zulip_bots/bots/helloworld Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11# See readme.md for instructions on running this code.
22
3+ from typing import Any
34
45class HelloWorldHandler (object ):
5- def usage (self ):
6+ def usage (self ) -> str :
67 return '''
78 This is a boilerplate bot that responds to a user query with
89 "beep boop", which is robot for "Hello World".
@@ -11,8 +12,8 @@ def usage(self):
1112 sophisticated, bots.
1213 '''
1314
14- def handle_message (self , message , bot_handler ) :
15- content = 'beep boop'
15+ def handle_message (self , message : Any , bot_handler : Any ) -> None :
16+ content = 'beep boop' # type: str
1617 bot_handler .send_reply (message , content )
1718
1819handler_class = HelloWorldHandler
Original file line number Diff line number Diff line change 33from zulip_bots .test_lib import StubBotTestCase
44
55class TestHelpBot (StubBotTestCase ):
6- bot_name = "helloworld"
6+ bot_name = "helloworld" # type: str
77
8- def test_bot (self ):
8+ def test_bot (self ) -> None :
99 dialog = [
1010 ('' , 'beep boop' ),
1111 ('help' , 'beep boop' ),
You can’t perform that action at this time.
0 commit comments