Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
tandemdude committed Jun 14, 2021
1 parent 262ab31 commit 47b7421
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 2 additions & 0 deletions lightbulb/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ def get_converter(self, annotation) -> _ConverterT:
The top level converter for the parameter
"""
annotation = _CONVERTER_CLASS_MAPPING.get(annotation, annotation)
if isinstance(annotation, str):
annotation = str

origin = typing.get_origin(annotation)
args = typing.get_args(annotation)
Expand Down
9 changes: 0 additions & 9 deletions lightbulb/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ async def to_int(ctx, number: int):
.. warning:: If you use ``from __future__ import annotations`` then you **will not** be able to use converters
in your commands. Instead of converting the arguments, the raw, unconverted arguments will be passed back
to the command.
.. error:: In the current state, var positional arguments **are not** supported. To achieve the same functionality
you should use an argument with the :obj:`~.Greedy` converter as seen below
::
@bot.command()
async def foo(ctx, arg: lightbulb.Greedy[str]):
....
"""
from __future__ import annotations

Expand Down

0 comments on commit 47b7421

Please sign in to comment.