Exit the context manager and restore the previous context.
(self, exc_type: Any, exc_val: Any, exc_tb: Any)
| 495 | return self |
| 496 | |
| 497 | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: |
| 498 | """ |
| 499 | Exit the context manager and restore the previous context. |
| 500 | """ |
| 501 | if self._token is not None: |
| 502 | _current_context.reset(self._token) |
| 503 | self._token = None |
| 504 | |
| 505 | async def __aenter__(self) -> TortoiseContext: |
| 506 | """ |