|
|
@ -29,6 +29,7 @@ import inspect |
|
|
|
from typing import ( |
|
|
|
Any, |
|
|
|
Dict, |
|
|
|
Generic, |
|
|
|
Iterable, |
|
|
|
Literal, |
|
|
|
Optional, |
|
|
@ -995,6 +996,9 @@ async def run_converters(ctx: Context, converter, argument: str, param: inspect. |
|
|
|
""" |
|
|
|
origin = getattr(converter, '__origin__', None) |
|
|
|
|
|
|
|
if origin is not None and issubclass(converter, Generic): # type: ignore |
|
|
|
converter = origin |
|
|
|
|
|
|
|
if origin is Union: |
|
|
|
errors = [] |
|
|
|
_NoneType = type(None) |
|
|
|