MCPcopy Index your code
hub / github.com/dbcli/mycli / ReusableLock

Class ReusableLock

test/utils.py:84–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84class ReusableLock:
85 def __init__(self, on_enter: Callable[[], Any] | None = None) -> None:
86 self.on_enter = on_enter
87
88 def __enter__(self) -> 'ReusableLock':
89 if self.on_enter is not None:
90 self.on_enter()
91 return self
92
93 def __exit__(self, exc_type: Any, exc: Any, tb: Any) -> Literal[False]:
94 return False
95
96
97class FakeCursorBase:

Calls

no outgoing calls