You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromipywidgetsimportHTMLfromIPython.displayimportdisplayh=HTML("<div>Hello!</div>")
h.
display(h)
Suppose I hit at the end of the fourth line, the API response will not contain any completion matches. But the kernel does actually have enough information to import and load HTML and make its instance methods and attributes available. This is how many IDEs work.
I'd like to request this level of completion be added. It would be a non-breaking update with no API ramifications, and it wouldn't necessarily be an imposition on other kernel authors (though it may encourage them to update their kernels, too).
You are right that this is fully within the message spec, and purely a behavior choice that IPython can make. IPython already has the notion of "greedy completion", allowing evaluation of the leading part of the current expression prior to evaluating the completion, which can sensibly be extended to the rest of the cell, as well. It's off by default, because it can result in undesirable side effects on completion. I think it may take some of the post-readline cleanup of the completion machinery to get this particular feature in, as there are several places remaining where the readline model is still baked in to IPython's completions.
I've started to push @michaelpacer on this task Wednesday [you can meet at SciPy]. Note that we briefly had Jedi completion during 5.0 cycle, so this kind of things used to work, but we rolled back because of bugs.
The kernel API function for completion requests (
complete_request
) does not specify the level of completeness (no pun intended) a client can expect for a certain input. For example, consider the following code:Suppose I hit at the end of the fourth line, the API response will not contain any completion matches. But the kernel does actually have enough information to import and load
HTML
and make its instance methods and attributes available. This is how many IDEs work.I'd like to request this level of completion be added. It would be a non-breaking update with no API ramifications, and it wouldn't necessarily be an imposition on other kernel authors (though it may encourage them to update their kernels, too).
cc: @ellisonbg @fperez @Carreau
The text was updated successfully, but these errors were encountered: