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

Function commit_api

IPython/external/qt_loaders.py:81–88  ·  view source on GitHub ↗

Commit to a particular API, and trigger ImportErrors on subsequent dangerous imports

(api)

Source from the content-addressed store, hash-verified

79
80
81def commit_api(api):
82 """Commit to a particular API, and trigger ImportErrors on subsequent
83 dangerous imports"""
84 modules = set(api_to_module.values())
85
86 modules.remove(api_to_module[api])
87 for mod in modules:
88 ID.forbid(mod)
89
90
91def loaded_api():

Callers 1

load_qtFunction · 0.85

Calls 2

forbidMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…