MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / commit_api

Function commit_api

pydev_ipython/qt_loaders.py:60–71  ·  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

58
59
60def commit_api(api):
61 """Commit to a particular API, and trigger ImportErrors on subsequent
62 dangerous imports"""
63
64 if api == QT_API_PYSIDE:
65 ID.forbid("PyQt4")
66 ID.forbid("PyQt5")
67 ID.forbid("PyQt6")
68 else:
69 ID.forbid("PySide")
70 ID.forbid("PySide2")
71 ID.forbid("PySide6")
72
73
74def loaded_api():

Callers 1

load_qtFunction · 0.85

Calls 1

forbidMethod · 0.80

Tested by

no test coverage detected