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

Method __enter__

src/filelock/_api.py:369–377  ·  view source on GitHub ↗

Acquire the lock. :return: the lock object

(self)

Source from the content-addressed store, hash-verified

367 _LOGGER.debug("Lock %s released on %s", lock_id, lock_filename)
368
369 def __enter__(self) -> Self:
370 """
371 Acquire the lock.
372
373 :return: the lock object
374
375 """
376 self.acquire()
377 return self
378
379 def __exit__(
380 self,

Callers

nothing calls this directly

Calls 1

acquireMethod · 0.95

Tested by

no test coverage detected