bundlespec: type the _bundlespeccontentopts dictionary
If only we had a tool to detect the kind of stupid error we just fixed… ho wait.
--- a/mercurial/bundlecaches.py Tue Apr 09 14:36:01 2024 +0200
+++ b/mercurial/bundlecaches.py Tue Apr 09 14:37:24 2024 +0200
@@ -6,6 +6,8 @@
import collections
from typing import (
+ Dict,
+ Union,
cast,
)
@@ -106,7 +108,7 @@
}
# Maps bundle version with content opts to choose which part to bundle
-_bundlespeccontentopts = {
+_bundlespeccontentopts: Dict[bytes, Dict[bytes, Union[bool, bytes]]] = {
b'v1': {
b'changegroup': True,
b'cg.version': b'01',