66log = logging .getLogger (__name__ )
77
88
9- def route (name : str = None ):
9+ def route (name = None ):
1010 """
1111 Used to register a coroutine as an endpoint when you don't have
1212 access to an instance of :class:`.Server`
@@ -30,7 +30,7 @@ def decorator(func):
3030
3131
3232class IpcServerResponse :
33- def __init__ (self , data : dict ):
33+ def __init__ (self , data ):
3434 self ._json = data
3535 self .length = len (data )
3636
@@ -75,11 +75,11 @@ class Server:
7575 def __init__ (
7676 self ,
7777 bot ,
78- host : str = "localhost" ,
79- port : int = 8765 ,
80- secret_key : str = None ,
81- do_multicast : bool = True ,
82- multicast_port : int = 20000 ,
78+ host = "localhost" ,
79+ port = 8765 ,
80+ secret_key = None ,
81+ do_multicast = True ,
82+ multicast_port = 20000 ,
8383 ):
8484 self .bot = bot
8585 self .loop = bot .loop
@@ -97,7 +97,7 @@ def __init__(
9797
9898 self .endpoints = {}
9999
100- def route (self , name : str = None ):
100+ def route (self , name = None ):
101101 """Used to register a coroutine as an endpoint when you have
102102 access to an instance of :class:`.Server`.
103103
@@ -123,7 +123,7 @@ def update_endpoints(self):
123123
124124 self .ROUTES = {}
125125
126- async def handle_accept (self , request : aiohttp . web . Request ):
126+ async def handle_accept (self , request ):
127127 """Handles websocket requests from the client process.
128128
129129 Parameters
@@ -206,7 +206,7 @@ async def handle_accept(self, request: aiohttp.web.Request):
206206
207207 raise JSONEncodeError (error_response )
208208
209- async def handle_multicast (self , request : aiohttp . web . Request ):
209+ async def handle_multicast (self , request ):
210210 """Handles multicasting websocket requests from the client.
211211
212212 Parameters
0 commit comments