Temporarily enable the patch within a `with` block and restore afterwards.
()
| 65 | |
| 66 | @contextmanager |
| 67 | def patch_context(): |
| 68 | """Temporarily enable the patch within a `with` block and restore afterwards.""" |
| 69 | enable_patch() |
| 70 | try: |
| 71 | yield |
| 72 | finally: |
| 73 | disable_patch() |
| 74 | |
| 75 | |
| 76 | # Re-export upstream classes for convenience. |
no test coverage detected