Skip to content

Commit e6b49ae

Browse files
authored
removing tuple usage
removing tuple usage
1 parent d6cdbaa commit e6b49ae

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

discord/utils.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,13 +1094,13 @@ async def autocomplete(ctx):
10941094
10951095
Parameters
10961096
-----------
1097-
values: Union[Union[Iterable[:class:`tuple`], Iterable[:class:`OptionChoice`], Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]], Callable[[:class:`AutocompleteContext`], Union[Union[Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]], Awaitable[Union[Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]], Awaitable[Union[Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]
1097+
values: Union[Union[Iterable[:class:`OptionChoice`], Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]], Callable[[:class:`AutocompleteContext`], Union[Union[Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]], Awaitable[Union[Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]], Awaitable[Union[Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]
10981098
Possible values for the option. Accepts an iterable of :class:`str`, a callable (sync or async) that takes a
10991099
single argument of :class:`AutocompleteContext`, or a coroutine. Must resolve to an iterable of :class:`str`.
11001100
11011101
Returns
11021102
--------
1103-
Callable[[:class:`AutocompleteContext`], Awaitable[Union[Iterable[:class:`tuple`], Iterable[:class:`OptionChoice`], Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]
1103+
Callable[[:class:`AutocompleteContext`], Awaitable[Union[Iterable[:class:`OptionChoice`], Iterable[:class:`str`], Iterable[:class:`int`], Iterable[:class:`float`]]]]
11041104
A wrapped callback for the autocomplete.
11051105
"""
11061106
async def autocomplete_callback(ctx: AutocompleteContext) -> V:
@@ -1112,20 +1112,6 @@ async def autocomplete_callback(ctx: AutocompleteContext) -> V:
11121112
_values = await _values
11131113

11141114
def check(item: Any) -> bool:
1115-
"""Comparator method
1116-
1117-
Parameters
1118-
----------
1119-
item : Any
1120-
parameter
1121-
1122-
Returns
1123-
-------
1124-
bool
1125-
if valid
1126-
"""
1127-
if isinstance(item, tuple):
1128-
item, _ = item
11291115
if hasattr(item, "to_dict"):
11301116
item = item.to_dict()["name"]
11311117
return str(item).lower().startswith(str(ctx.value or "").lower())

0 commit comments

Comments
 (0)