Mercurial > public > mercurial-scm > hg-stable
diff mercurial/branchmap.py @ 52676:f066fc0bdc7a
pyupgrade: use set literals where possible
This was rewritten by the `set_literals` fixer in `pyupgrade`. I thought there
was a past change around using set literals, but I can't find it now.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 06 Jan 2025 01:33:08 -0500 |
parents | 4cb75772818d |
children |
line wrap: on
line diff
--- a/mercurial/branchmap.py Mon Jan 06 01:27:42 2025 -0500 +++ b/mercurial/branchmap.py Mon Jan 06 01:33:08 2025 -0500 @@ -915,7 +915,7 @@ if self._pure_topo_branch is None: # we match using node because it is faster to built the set of node # than to resolve node → rev later. - topo_heads = set(to_node(r) for r in self._get_topo_heads(repo)) + topo_heads = {to_node(r) for r in self._get_topo_heads(repo)} for label, nodes in sorted(self._entries.items()): if label == self._pure_topo_branch: # not need to write anything the header took care of that