Use typing.Protocol instead of abc.ABCMeta
This commit is contained in:
1 parent
fe54b3cb92
commit
34ab772653
4 files changed
+99
-101
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user