MCPcopy Create free account
hub / github.com/ipython/ipython / provisionalcompleter

Function provisionalcompleter

IPython/core/completer.py:184–209  ·  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 By

(action='ignore')

Source from the content-addressed store, hash-verified

182
183@contextmanager
184def provisionalcompleter(action='ignore'):
185 """
186
187
188 This context manager has to be used in any place where unstable completer
189 behavior and API may be called.
190
191 >>> with provisionalcompleter():
192 ... completer.do_experimental_things() # works
193
194 >>> completer.do_experimental_things() # raises.
195
196 .. note:: Unstable
197
198 By using this context manager you agree that the API in use may change
199 without warning, and that you won't complain if they do so.
200
201 You also understand that, if the API is not to your liking, you should report
202 a bug to explain your use case upstream.
203
204 We'll be happy to get your feedback, feature requests, and improvements on
205 any of the unstable APIs!
206 """
207 with warnings.catch_warnings():
208 warnings.filterwarnings(action, category=ProvisionalCompleterWarning)
209 yield
210
211
212def has_open_quotes(s):

Callers 10

get_completionsMethod · 0.90
_test_completeMethod · 0.90
_test_not_completeMethod · 0.90
_Method · 0.90
test_omit__namesMethod · 0.90
all_completionsMethod · 0.85

Calls

no outgoing calls

Tested by 8

_test_completeMethod · 0.72
_test_not_completeMethod · 0.72
_Method · 0.72
test_omit__namesMethod · 0.72