MCPcopy Create free account
hub / github.com/tox-dev/filelock / __exit__

Method __exit__

src/filelock/asyncio.py:337–345  ·  view source on GitHub ↗

Sync context manager exit is not supported because lock release is a coroutine.

(
        self,
        exc_type: type[BaseException] | None,
        exc_value: BaseException | None,
        traceback: object,
    )

Source from the content-addressed store, hash-verified

335 raise NotImplementedError(msg)
336
337 def __exit__(
338 self,
339 exc_type: type[BaseException] | None,
340 exc_value: BaseException | None,
341 traceback: object,
342 ) -> None:
343 """Sync context manager exit is not supported because lock release is a coroutine."""
344 msg = "Use `async with` — acquire/release are coroutines and cannot be awaited in a sync context manager."
345 raise NotImplementedError(msg)
346
347 async def __aenter__(self) -> Self:
348 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected