MCPcopy Index your code
hub / github.com/ipython/ipython / provisionalcompleter

Function provisionalcompleter

IPython/core/completer.py:311–336  ·  view source on GitHub ↗

This context manager has to be used in any place where unstable completer behavior and API may be called. >>> with provisionalcompleter(): ... completer.do_experimental_things() # works >>> completer.do_experimental_things() # raises. .. note:: Unstable

(action='ignore')

Source from the content-addressed store, hash-verified

309@skip_doctest
310@contextmanager
311def provisionalcompleter(action='ignore'):
312 """
313 This context manager has to be used in any place where unstable completer
314 behavior and API may be called.
315
316 >>> with provisionalcompleter():
317 ... completer.do_experimental_things() # works
318
319 >>> completer.do_experimental_things() # raises.
320
321 .. note::
322
323 Unstable
324
325 By using this context manager you agree that the API in use may change
326 without warning, and that you won't complain if they do so.
327
328 You also understand that, if the API is not to your liking, you should report
329 a bug to explain your use case upstream.
330
331 We'll be happy to get your feedback, feature requests, and improvements on
332 any of the unstable APIs!
333 """
334 with warnings.catch_warnings():
335 warnings.filterwarnings(action, category=ProvisionalCompleterWarning)
336 yield
337
338
339def has_open_quotes(s: str) -> Union[str, bool]:

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…