diff mercurial/windows.py @ 51779:e618a1756b08

typing: avoid some useless @overload definitions in `mercurial.util` Apparently pytype considered the name as well as the type of each argument, and generates @overload definitions if they don't match. At best this is clutter, and can easily be removed.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 19 Jul 2024 16:38:53 -0400
parents f3b34386d3e0
children 1888846a1ee2
line wrap: on
line diff
--- a/mercurial/windows.py	Thu Jul 18 22:46:36 2024 -0400
+++ b/mercurial/windows.py	Fri Jul 19 16:38:53 2024 -0400
@@ -620,10 +620,10 @@
     return None
 
 
-def readlink(pathname: bytes) -> bytes:
-    path = pycompat.fsdecode(pathname)
+def readlink(path: bytes) -> bytes:
+    path_str = pycompat.fsdecode(path)
     try:
-        link = os.readlink(path)
+        link = os.readlink(path_str)
     except ValueError as e:
         # On py2, os.readlink() raises an AttributeError since it is
         # unsupported.  On py3, reading a non-link raises a ValueError.  Simply