[commands] Change BotT to be covariant

This commit is contained in:
Rapptz 2022-03-18 01:12:50 -04:00
parent 98a31cf285
commit 02b79eb219

View File

@ -51,7 +51,7 @@ CoroFunc = Callable[..., Coro[Any]]
ContextT = TypeVar('ContextT', bound='Context')
_Bot = Union['Bot', 'AutoShardedBot']
BotT = TypeVar('BotT', bound=_Bot)
BotT = TypeVar('BotT', bound=_Bot, covariant=True)
Check = Union[Callable[["Cog", "ContextT"], MaybeCoro[bool]], Callable[["ContextT"], MaybeCoro[bool]]]
Hook = Union[Callable[["Cog", "ContextT"], Coro[Any]], Callable[["ContextT"], Coro[Any]]]