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

Function evaluation_policy

tests/test_completer.py:145–155  ·  view source on GitHub ↗
(evaluation: str, **overrides)

Source from the content-addressed store, hash-verified

143
144@contextmanager
145def evaluation_policy(evaluation: str, **overrides):
146 ip = get_ipython()
147 evaluation_original = ip.Completer.evaluation
148 overrides_original = ip.Completer.policy_overrides
149 try:
150 ip.Completer.evaluation = evaluation
151 ip.Completer.policy_overrides = overrides
152 yield
153 finally:
154 ip.Completer.evaluation = evaluation_original
155 ip.Completer.policy_overrides = overrides_original
156
157
158@contextmanager

Calls 1

get_ipythonFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…