Skip to content

Commit

Permalink
asyncio.Task does not support documenting inner type
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Apr 21, 2024
1 parent 27dd0b5 commit 8adadab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lavalink/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async def get_rest_latency(self) -> float:

return (time() - start) * 1000

async def connect(self, force: bool = False) -> Optional[Task[Any]]:
async def connect(self, force: bool = False) -> Optional[Task]:
"""|coro|
Initiates a WebSocket connection to this node.
Expand All @@ -154,7 +154,7 @@ async def connect(self, force: bool = False) -> Optional[Task[Any]]:
Returns
-------
Optional[:class:`asyncio.Task`[Any]]
Optional[:class:`asyncio.Task`]
The WebSocket connection task, or ``None`` if a WebSocket connection already exists and force
is ``False``.
"""
Expand Down
2 changes: 1 addition & 1 deletion lavalink/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def close(self, code=aiohttp.WSCloseCode.OK):
await self._ws.close(code=code)
self._ws = None

def connect(self) -> asyncio.Task[Any]:
def connect(self) -> asyncio.Task:
""" Attempts to establish a connection to Lavalink. """
loop = asyncio.get_event_loop()
return loop.create_task(self._connect())
Expand Down

0 comments on commit 8adadab

Please sign in to comment.