Mercurial > public > mercurial-scm > hg-stable
diff mercurial/verify.py @ 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 | 812cd3dfa4cb |
children | 73b9558a0c56 |
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: