Mercurial > hg
changeset 51800:62806be5cbda
typing: add hints to `mercurial.util.mktempcopy()`
Might as well, now that the previous commit indicated what types are required.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 10 Aug 2024 14:22:26 -0400 |
parents | 1888846a1ee2 |
children | 62b25293b620 |
files | mercurial/util.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Sat Aug 10 14:18:44 2024 -0400 +++ b/mercurial/util.py Sat Aug 10 14:22:26 2024 -0400 @@ -2432,7 +2432,12 @@ return path.split(pycompat.ossep) -def mktempcopy(name, emptyok=False, createmode=None, enforcewritable=False): +def mktempcopy( + name: bytes, + emptyok: bool = False, + createmode: Optional[int] = None, + enforcewritable: bool = False, +) -> bytes: """Create a temporary file with the same contents from name The permission bits are copied from the original file.