MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / __repr__

Method __repr__

pymongo/_asyncio_lock.py:201–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

199 self._waiters: collections.deque[Any] = collections.deque()
200
201 def __repr__(self) -> str:
202 res = super().__repr__()
203 extra = "locked" if self.locked() else "unlocked"
204 if self._waiters:
205 extra = f"{extra}, waiters:{len(self._waiters)}"
206 return f"<{res[1:-1]} [{extra}]>"
207
208 async def wait(self) -> bool:
209 """Wait until notified.

Callers

nothing calls this directly

Calls 2

lockedMethod · 0.80
__repr__Method · 0.45

Tested by

no test coverage detected