bundlespec: type the _bundlespeccontentopts dictionary
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 09 Apr 2024 14:37:24 +0200
changeset 51574 9b51a4fb0f96
parent 51573 4a9d0898bf16
child 51575 f610d705c3ca
bundlespec: type the _bundlespeccontentopts dictionary If only we had a tool to detect the kind of stupid error we just fixed… ho wait.
mercurial/bundlecaches.py
--- 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',