MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / __exit__

Method __exit__

verify.py:546–555  ·  view source on GitHub ↗
(self, *exc)

Source from the content-addressed store, hash-verified

544 return self.model
545
546 def __exit__(self, *exc):
547 # Restore all original modules
548 for name, original in self._original_modules.items():
549 parts = name.split(".")
550 parent = self.model
551 for p in parts[:-1]:
552 parent = getattr(parent, p)
553 setattr(parent, parts[-1], original)
554 self._original_modules.clear()
555 self._applied.clear()
556
557 def _apply_replacement(self, repl: KernelReplacement) -> int:
558 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected