diff -r f1ef512e14ab -r 460e80488cf0 mercurial/lock.py --- a/mercurial/lock.py Tue Aug 20 17:46:17 2024 -0400 +++ b/mercurial/lock.py Tue Aug 20 18:30:47 2024 -0400 @@ -110,7 +110,7 @@ raiseinterrupt(assertedsigs[0]) -def trylock(ui, vfs, lockname, timeout, warntimeout, *args, **kwargs): +def trylock(ui, vfs, lockname, timeout, warntimeout, *args, **kwargs) -> "lock": """return an acquired lock or raise an a LockHeld exception This function is responsible to issue warnings and or debug messages about @@ -256,7 +256,7 @@ # wrapper around procutil.getpid() to make testing easier return procutil.getpid() - def lock(self): + def lock(self) -> int: timeout = self.timeout while True: try: @@ -272,7 +272,7 @@ errno.ETIMEDOUT, inst.filename, self.desc, inst.locker ) - def _trylock(self): + def _trylock(self) -> None: if self.held: self.held += 1 return