changeset 51777:45828bc3c3d6

typing: add type hints to `mercurial.verify._normpath()` Since 10db46e128d4, pytype almost figured this out, going from `Any` -> `_T0`, but the intent is obvious.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 18 Jul 2024 20:34:35 -0400
parents f841de63a5aa
children 7558cee89655
files mercurial/verify.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Thu Jul 18 20:16:31 2024 -0400
+++ b/mercurial/verify.py	Thu Jul 18 20:34:35 2024 -0400
@@ -31,7 +31,7 @@
         return v.verify()
 
 
-def _normpath(f):
+def _normpath(f: bytes) -> bytes:
     # under hg < 2.4, convert didn't sanitize paths properly, so a
     # converted repo may contain repeated slashes
     while b'//' in f: