File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 153153 CmdOrSet ,
154154 CompleterBound ,
155155 CompleterUnbound ,
156- Matchable ,
157156)
158157
159158with contextlib .suppress (ImportError ):
@@ -1823,7 +1822,7 @@ def basic_complete(
18231822 line : str , # noqa: ARG002
18241823 begidx : int , # noqa: ARG002
18251824 endidx : int , # noqa: ARG002
1826- match_against : Iterable [Matchable ],
1825+ match_against : Iterable [str | CompletionItem ],
18271826 * ,
18281827 sort : bool = True ,
18291828 ) -> Completions :
Original file line number Diff line number Diff line change 1515if TYPE_CHECKING : # pragma: no cover
1616 from .cmd2 import Cmd
1717 from .command_definition import CommandSet
18- from .completion import Choices , CompletionItem , Completions
18+ from .completion import Choices , Completions
1919
2020# A Cmd or CommandSet
2121CmdOrSet = TypeVar ("CmdOrSet" , bound = Union ["Cmd" , "CommandSet" ])
2727# Represents the parsed tokens from argparse during completion
2828ArgTokens : TypeAlias = Mapping [str , Sequence [str ]]
2929
30- # Represents a type that can be matched against when completing.
31- # Strings are matched directly while CompletionItems are matched
32- # against their 'text' member.
33- Matchable : TypeAlias = Union [str , "CompletionItem" ]
34-
3530##################################################
3631# choices_provider function types
3732##################################################
You can’t perform that action at this time.
0 commit comments