Use typing.Protocol instead of abc.ABCMeta

This commit is contained in:
James authored and GitHub committed 2021-04-04 18:05:49 -04:00
1 parent fe54b3cb92
commit 34ab772653
4 files changed
+99 -101

No files matched your search

-5
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