mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-06 11:57:17 +00:00
[commands] Add overload to run_converters
This commit is contained in:
parent
18a6881fd9
commit
9fcb3c8871
@ -35,6 +35,7 @@ from typing import (
|
|||||||
List,
|
List,
|
||||||
Literal,
|
Literal,
|
||||||
Optional,
|
Optional,
|
||||||
|
overload,
|
||||||
Protocol,
|
Protocol,
|
||||||
Tuple,
|
Tuple,
|
||||||
Type,
|
Type,
|
||||||
@ -1242,6 +1243,18 @@ async def _actual_conversion(ctx: Context[BotT], converter, argument: str, param
|
|||||||
raise BadArgument(f'Converting to "{name}" failed for parameter "{param.name}".') from exc
|
raise BadArgument(f'Converting to "{name}" failed for parameter "{param.name}".') from exc
|
||||||
|
|
||||||
|
|
||||||
|
@overload
|
||||||
|
async def run_converters(
|
||||||
|
ctx: Context[BotT], converter: Union[Type[Converter[T]], Converter[T]], argument: str, param: Parameter
|
||||||
|
) -> T:
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
@overload
|
||||||
|
async def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any:
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
async def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any:
|
async def run_converters(ctx: Context[BotT], converter: Any, argument: str, param: Parameter) -> Any:
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user