PYTHON-3782 add types to lock.py (#1271)

This commit is contained in:
Iris 2023-06-28 09:29:32 -07:00 committed by GitHub
parent 91711ee366
commit 7d19205540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ _HAS_REGISTER_AT_FORK = hasattr(os, "register_at_fork")
_forkable_locks: weakref.WeakSet = weakref.WeakSet()
def _create_lock():
def _create_lock() -> threading.Lock:
"""Represents a lock that is tracked upon instantiation using a WeakSet and
reset by pymongo upon forking.
"""