(self, *exc)
| 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 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected