Use typing.Protocol instead of abc.ABCMeta

This commit is contained in:
James
2021-04-04 23:05:49 +01:00
committed by GitHub
parent fe54b3cb92
commit 34ab772653
4 changed files with 99 additions and 101 deletions

View File

@@ -448,11 +448,6 @@ class Command(_BaseCommand):
instance = converter()
ret = await instance.convert(ctx, argument)
return ret
else:
method = getattr(converter, 'convert', None)
if method is not None and inspect.ismethod(method):
ret = await method(ctx, argument)
return ret
elif isinstance(converter, converters.Converter):
ret = await converter.convert(ctx, argument)
return ret