Context manager that reloads a module after executing the body. This should undo any damage done to the module state while mucking around.
(self, module: str)
| 301 | |
| 302 | @contextmanager |
| 303 | def restore_after(self, module: str) -> Iterator[None]: |
| 304 | """Context manager that reloads a module after executing the body. |
| 305 | |
| 306 | This should undo any damage done to the module state while mucking around. |
| 307 | """ |
| 308 | try: |
| 309 | yield |
| 310 | finally: |
| 311 | self.reload(self.graph[module]) |
| 312 | |
| 313 | @contextmanager |
| 314 | def with_export_types(self) -> Iterator[None]: |
no test coverage detected