Skip to content

Commit

Permalink
chore: clarify __call__ comment
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv committed Oct 9, 2023
1 parent aebe22c commit bb03995
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion disnake/ext/commands/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@ def parse_converter_annotation(self, converter: Callable, fallback_annotation: A
if isinstance(converter, (types.FunctionType, types.MethodType)):
converter_func = converter
else:
# if converter isn't a function/method, it should be a callable object/type
# if converter isn't a function/method, assume it's a callable object/type
# (we need `__call__` here to get the correct global namespace later, since
# classes do not have `__globals__`)
converter_func = converter.__call__
_, parameters = isolate_self(get_signature_parameters(converter_func))

Expand Down

0 comments on commit bb03995

Please sign in to comment.