##// END OF EJS Templates
branchmap: annotate constructor type for branchcache...
Augie Fackler -
r44035:9c1eccdd default
parent child Browse files
Show More
@@ -27,6 +27,23 b' from .utils import ('
27 27 stringutil,
28 28 )
29 29
30 if not globals():
31 from typing import (
32 Any,
33 Callable,
34 Dict,
35 Iterable,
36 List,
37 Optional,
38 Set,
39 Tuple,
40 Union,
41 )
42
43 assert any(
44 (Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Union,)
45 )
46
30 47 subsettable = repoviewutil.subsettable
31 48
32 49 calcsize = struct.calcsize
@@ -165,6 +182,7 b' class branchcache(object):'
165 182 closednodes=None,
166 183 hasnode=None,
167 184 ):
185 # type: (Union[Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]], bytes, int, Optional[bytes], Optional[Set[bytes]], Optional[Callable[[bytes], bool]]) -> None
168 186 """ hasnode is a function which can be used to verify whether changelog
169 187 has a given node or not. If it's not provided, we assume that every node
170 188 we have exists in changelog """
@@ -177,7 +195,7 b' class branchcache(object):'
177 195 if closednodes is None:
178 196 self._closednodes = set()
179 197 else:
180 self._closednodes = set(closednodes)
198 self._closednodes = closednodes
181 199 self._entries = dict(entries)
182 200 # whether closed nodes are verified or not
183 201 self._closedverified = False
General Comments 0
You need to be logged in to leave comments. Login now