@@ -1094,13 +1094,13 @@ async def autocomplete(ctx):
1094
1094
1095
1095
Parameters
1096
1096
-----------
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`]]]]
1098
1098
Possible values for the option. Accepts an iterable of :class:`str`, a callable (sync or async) that takes a
1099
1099
single argument of :class:`AutocompleteContext`, or a coroutine. Must resolve to an iterable of :class:`str`.
1100
1100
1101
1101
Returns
1102
1102
--------
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`]]]]
1104
1104
A wrapped callback for the autocomplete.
1105
1105
"""
1106
1106
async def autocomplete_callback (ctx : AutocompleteContext ) -> V :
@@ -1112,20 +1112,6 @@ async def autocomplete_callback(ctx: AutocompleteContext) -> V:
1112
1112
_values = await _values
1113
1113
1114
1114
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
1129
1115
if hasattr (item , "to_dict" ):
1130
1116
item = item .to_dict ()["name" ]
1131
1117
return str (item ).lower ().startswith (str (ctx .value or "" ).lower ())
0 commit comments