bundles / IPython 9.14.0.dev / IPython / core / completer / IPCompleter / _complete
function
IPython.core.completer:IPCompleter._complete
source: /IPython/core/completer.py :3573
Signature
def _complete ( self , * , cursor_line , cursor_pos , line_buffer = None , text = None , full_text = None ) → _CompleteResult Summary
Like complete but can also returns raw jedi completions as well as the origin of the completion text. This could (and should) be made much cleaner but that will be simpler once we drop the old (and stateful) complete API.
Extended Summary
With current provisional API, cursor_pos act both (depending on the caller) as the offset in the text or line_buffer, or as the column when passing multiline strings this could/should be renamed but would add extra noise.
Parameters
cursor_lineIndex of the line the cursor is on. 0 indexed.
cursor_posPosition of the cursor in the current line/line_buffer/text. 0 indexed.
line_buffer: optional, strThe current line the cursor is in, this is mostly due to legacy reason that readline could only give a us the single current line. Prefer
full_text.text: strThe current "token" the cursor is in, mostly also for historical reasons. as the completer would trigger only after the current line was parsed.
full_text: strFull text of the current cell.
Returns
: An ordered dictionary where keys are identifiers of completion: matchers and values are ``MatcherResult``s.
Aliases
-
IPython.core.completer.IPCompleter._complete