(self, module_str: str)
| 67 | raise |
| 68 | |
| 69 | def _load_extension(self, module_str: str): |
| 70 | if module_str in self.loaded: |
| 71 | return "already loaded" |
| 72 | |
| 73 | assert self.shell is not None |
| 74 | |
| 75 | with self.shell.builtin_trap: |
| 76 | if module_str not in sys.modules: |
| 77 | mod = import_module(module_str) |
| 78 | mod = sys.modules[module_str] |
| 79 | if self._call_load_ipython_extension(mod): |
| 80 | self.loaded.add(module_str) |
| 81 | else: |
| 82 | return "no load function" |
| 83 | |
| 84 | def unload_extension(self, module_str: str): |
| 85 | """Unload an IPython extension by its module name. |
no test coverage detected