bundles / IPython 9.12.0 / IPython / core / completer / rectify_completions
function
IPython.core.completer:rectify_completions
source: /IPython/core/completer.py :835
Signature
def rectify_completions ( text : str , completions : _IC , * , _debug : bool = False ) → _IC Summary
Rectify a set of completions to all have the same start and end
Extended Summary
Parameters
text: strtext that should be completed.
completions: Iterator[Completion]iterator over the completions to rectify
_debug: boolLog failed completion
Notes
jedi.api.classes.Completion s returned by Jedi may not have the same start and end, though the Jupyter Protocol requires them to behave like so. This will readjust the completion to have the same start and end by padding both extremities with surrounding text.
During stabilisation should support a _debug option to log which completion are return by the IPython completer and not found in Jedi in order to make upstream bug report.
Aliases
-
IPython.core.completer.rectify_completions