IPython 8.4.0 Pypi GitHub Homepage
Other Docs
_completions(self, full_text: str, offset: int, *, _timeout) -> Iterator[IPython.core.completer.Completion]

Computing jedi's completion .type can be quite expensive (it is a lazy property) and can require some warm-up, more warm up than just computing the name of a completion. The warm-up can be :

install/update: actually build parse/inference tree.

disk.

We don't want to block completions for tens of seconds so we give the completer a "budget" of _timeout seconds per invocation to compute completions types, the completions that have not yet been computed will be marked as "unknown" an will have a chance to be computed next round are things get cached.

Keep in mind that Jedi is not the only thing treating the completion so keep the timeout short-ish as if we take more than 0.3 second we still have lots of processing to do.

Core completion module.Same signature as completions , with the extra :None:None:`timeout` parameter (in seconds).

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/core/completer.py#1926
type: <class 'function'>
Commit: