11from __future__ import annotations
22
33import logging
4- from re import compile , escape
54from collections import Counter
5+ from re import compile , escape
66from typing import Any , Collection , Generator , Iterable , Literal , Sequence
77
88from prompt_toolkit .completion import CompleteEvent , Completer , Completion
99from prompt_toolkit .completion .base import Document
1010
1111from .packages .completion_engine import suggest_type
12- from .packages .parseutils import last_word
13- from .packages .special . iocommands import favoritequeries
12+ from .packages .filepaths import complete_path , parse_path , suggest_path
13+ from .packages .parseutils import LAST_WORD_INCLUDE_TYPE , last_word
1414from .packages .special import llm
15- from .packages .filepaths import parse_path , complete_path , suggest_path
15+ from .packages .special . iocommands import favoritequeries
1616
1717_logger = logging .getLogger (__name__ )
1818
@@ -381,7 +381,7 @@ def extend_functions(self, func_data: Iterable[Sequence[str]]) -> None:
381381 metadata [self .dbname ][func [0 ]] = None
382382 self .all_completions .add (func [0 ])
383383
384- def set_dbname (self , dbname : str ) -> None :
384+ def set_dbname (self , dbname : str | None ) -> None :
385385 self .dbname = dbname
386386
387387 def reset_completions (self ) -> None :
@@ -397,7 +397,7 @@ def find_matches(
397397 start_only : bool = False ,
398398 fuzzy : bool = True ,
399399 casing : str | None = None ,
400- punctuations : str = "most_punctuations" ,
400+ punctuations : LAST_WORD_INCLUDE_TYPE = "most_punctuations" ,
401401 ) -> Generator [Completion , None , None ]:
402402 """Find completion matches for the given text.
403403
0 commit comments