comparison hgext/phabricator.py @ 52880:e02c36478284

typing: add some type annotations around `mercurial.util.sortdict` usage There are a handful of places where this class is used in the generated *.pyi files, and they were mostly showing as `sortdict[nothing, nothing]`. These are the easy ones to fix. There are a few other uses around tags, `revset.py`, and `parser.py`, but the related code looks extremely complicated.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 21 Dec 2024 17:43:38 -0500
parents 24ee91ba9aa8
children b8da7eed1657
comparison
equal deleted inserted replaced
52879:b1daf3064362 52880:e02c36478284
1689 unfi.setparents(mapping[wnode][0]) 1689 unfi.setparents(mapping[wnode][0])
1690 1690
1691 1691
1692 # Map from "hg:meta" keys to header understood by "hg import". The order is 1692 # Map from "hg:meta" keys to header understood by "hg import". The order is
1693 # consistent with "hg export" output. 1693 # consistent with "hg export" output.
1694 _metanamemap = util.sortdict( 1694 _metanamemap: util.sortdict[bytes, bytes] = util.sortdict(
1695 [ 1695 [
1696 (b'user', b'User'), 1696 (b'user', b'User'),
1697 (b'date', b'Date'), 1697 (b'date', b'Date'),
1698 (b'branch', b'Branch'), 1698 (b'branch', b'Branch'),
1699 (b'node', b'Node ID'), 1699 (b'node', b'Node ID'),