typing: add hints to `mercurial.util.mktempcopy()`
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 10 Aug 2024 14:22:26 -0400
changeset 51800 62806be5cbda
parent 51799 1888846a1ee2
child 51801 62b25293b620
typing: add hints to `mercurial.util.mktempcopy()` Might as well, now that the previous commit indicated what types are required.
mercurial/util.py
--- 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.