typing: add some trivial type hints to `mercurial/bundlecaches.py`
The function is meant for extensions, but it wasn't obvious what was expected
without looking through the code. Also, pytype couldn't figure it out either.
--- a/mercurial/bundlecaches.py Wed Jul 10 17:09:34 2024 -0400
+++ b/mercurial/bundlecaches.py Wed Jul 10 17:16:19 2024 -0400
@@ -30,7 +30,7 @@
CLONEBUNDLESCHEME = b"peer-bundle-cache://"
-def get_manifest(repo):
+def get_manifest(repo) -> bytes:
"""get the bundle manifest to be served to a client from a server"""
raw_text = repo.vfs.tryread(CB_MANIFEST_FILE)
entries = [e.split(b' ', 1) for e in raw_text.splitlines()]
@@ -46,7 +46,7 @@
return b''.join(new_lines)
-def alter_bundle_url(repo, url):
+def alter_bundle_url(repo, url: bytes) -> bytes:
"""a function that exist to help extension and hosting to alter the url
This will typically be used to inject authentication information in the url