Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/branchmap.py @ 51304:f15cb5111a1e
pytype: move some type comment to proper annotation
We support direct type annotations now, while pytype is starting to complains
about them.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 19 Dec 2023 21:29:34 +0100 |
parents | 9d3721552b6c |
children | f4a0806081f2 |
comparison
equal
deleted
inserted
replaced
51303:81224afd938d | 51304:f15cb5111a1e |
---|---|
194 branch head closes a branch or not. | 194 branch head closes a branch or not. |
195 """ | 195 """ |
196 | 196 |
197 def __init__( | 197 def __init__( |
198 self, | 198 self, |
199 repo, | 199 repo: "localrepo.localrepository", |
200 entries=(), | 200 entries: Union[ |
201 tipnode=None, | 201 Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]] |
202 tiprev=nullrev, | 202 ] = (), |
203 filteredhash=None, | 203 tipnode: Optional[bytes] = None, |
204 closednodes=None, | 204 tiprev: Optional[int] = nullrev, |
205 hasnode=None, | 205 filteredhash: Optional[bytes] = None, |
206 ): | 206 closednodes: Optional[Set[bytes]] = None, |
207 # type: (localrepo.localrepository, Union[Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]], bytes, int, Optional[bytes], Optional[Set[bytes]], Optional[Callable[[bytes], bool]]) -> None | 207 hasnode: Optional[Callable[[bytes], bool]] = None, |
208 ) -> None: | |
208 """hasnode is a function which can be used to verify whether changelog | 209 """hasnode is a function which can be used to verify whether changelog |
209 has a given node or not. If it's not provided, we assume that every node | 210 has a given node or not. If it's not provided, we assume that every node |
210 we have exists in changelog""" | 211 we have exists in changelog""" |
211 self._repo = repo | 212 self._repo = repo |
212 self._delayed = False | 213 self._delayed = False |