MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / __exit__

Method __exit__

tortoise/context.py:497–503  ·  view source on GitHub ↗

Exit the context manager and restore the previous context.

(self, exc_type: Any, exc_val: Any, exc_tb: Any)

Source from the content-addressed store, hash-verified

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 """

Callers 1

__aexit__Method · 0.95

Calls 1

resetMethod · 0.80

Tested by

no test coverage detected