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

Method new_module

IPython/extensions/tests/test_deduperreload.py:783–788  ·  view source on GitHub ↗
(self, code)

Source from the content-addressed store, hash-verified

781 f.write(squish_text(content))
782
783 def new_module(self, code):
784 mod_name, mod_fn = self.get_module()
785 with open(mod_fn, "w", encoding="utf-8") as f:
786 f.write(squish_text(code))
787 self.created_temp_modules.add(mod_name)
788 return mod_name, mod_fn
789
790
791class AutoreloadHookSuite(ShellFixture):

Calls 4

get_moduleMethod · 0.95
squish_textFunction · 0.85
writeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected