Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 51885:cbd01bf33802
typing: add type annotations to `mercurial.util.makelock()`
This bubbles up into the `vfs` classes, so get this out of the way.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 20 Sep 2024 01:10:17 -0400 |
parents | f833ad92ee44 |
children | bc9ed92d4753 |
comparison
equal
deleted
inserted
replaced
51884:f833ad92ee44 | 51885:cbd01bf33802 |
---|---|
2183 checkosfilename = platform.checkosfilename # pytype: disable=module-attr | 2183 checkosfilename = platform.checkosfilename # pytype: disable=module-attr |
2184 if not timer: | 2184 if not timer: |
2185 timer = time.time | 2185 timer = time.time |
2186 | 2186 |
2187 | 2187 |
2188 def makelock(info, pathname): | 2188 def makelock(info: bytes, pathname: bytes) -> None: |
2189 """Create a lock file atomically if possible | 2189 """Create a lock file atomically if possible |
2190 | 2190 |
2191 This may leave a stale lock file if symlink isn't supported and signal | 2191 This may leave a stale lock file if symlink isn't supported and signal |
2192 interrupt is enabled. | 2192 interrupt is enabled. |
2193 """ | 2193 """ |