Fixe docstring of the bind method

This commit is contained in:
Alex Root Junior 2023-07-08 03:19:07 +03:00
parent 7ea168a84b
commit 31c151d4a0
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC

View file

@ -16,7 +16,12 @@ class BotContextController(BaseModel):
else:
self._bot = __context.get("bot")
def as_(self, bot: "Bot") -> Self:
"""Bind object to a bot instance."""
def as_(self, bot: Optional["Bot"]) -> Self:
"""
Bind object to a bot instance.
:param bot: Bot instance
:return: self
"""
self._bot = bot
return self