MCPcopy Index your code
hub / github.com/prompt-toolkit/ptpython / __init__

Method __init__

src/ptpython/completer.py:48–65  ·  view source on GitHub ↗
(
        self,
        get_globals: Callable[[], dict[str, Any]],
        get_locals: Callable[[], dict[str, Any]],
        enable_dictionary_completion: Callable[[], bool],
    )

Source from the content-addressed store, hash-verified

46 """
47
48 def __init__(
49 self,
50 get_globals: Callable[[], dict[str, Any]],
51 get_locals: Callable[[], dict[str, Any]],
52 enable_dictionary_completion: Callable[[], bool],
53 ) -> None:
54 super().__init__()
55
56 self.get_globals = get_globals
57 self.get_locals = get_locals
58 self.enable_dictionary_completion = enable_dictionary_completion
59
60 self._system_completer = SystemCompleter()
61 self._jedi_completer = JediCompleter(get_globals, get_locals)
62 self._dictionary_completer = DictionaryCompleter(get_globals, get_locals)
63
64 self._path_completer_cache: GrammarCompleter | None = None
65 self._path_completer_grammar_cache: _CompiledGrammar | None = None
66
67 @property
68 def _path_completer(self) -> GrammarCompleter:

Callers

nothing calls this directly

Calls 3

JediCompleterClass · 0.85
DictionaryCompleterClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected