manifest: type and fix unhexlify
Some part of that function seems to date back from Python 2. It raise question
about whether this function is useful or not, but let us just fix it for now.
This was caught by pytype.
--- a/mercurial/manifest.py Sun Aug 04 10:45:31 2024 +0200
+++ b/mercurial/manifest.py Sun Aug 04 10:47:29 2024 +0200
@@ -143,10 +143,10 @@
__next__ = next
-def unhexlify(data, extra, pos, length):
+def unhexlify(data: bytes, extra: int, pos, length: int):
s = bin(data[pos : pos + length])
if extra:
- s += chr(extra & 0xFF)
+ s += bytes([extra & 0xFF])
return s