Mercurial > hg
diff mercurial/branchmap.py @ 51287: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 |
line wrap: on
line diff
--- a/mercurial/branchmap.py Wed Dec 20 20:13:22 2023 +0100 +++ b/mercurial/branchmap.py Tue Dec 19 21:29:34 2023 +0100 @@ -196,15 +196,16 @@ def __init__( self, - repo, - entries=(), - tipnode=None, - tiprev=nullrev, - filteredhash=None, - closednodes=None, - hasnode=None, - ): - # 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 + repo: "localrepo.localrepository", + entries: Union[ + Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]] + ] = (), + tipnode: Optional[bytes] = None, + tiprev: Optional[int] = nullrev, + filteredhash: Optional[bytes] = None, + closednodes: Optional[Set[bytes]] = None, + hasnode: Optional[Callable[[bytes], bool]] = None, + ) -> None: """hasnode is a function which can be used to verify whether changelog has a given node or not. If it's not provided, we assume that every node we have exists in changelog"""