pyupgrade: replace `dict(...)` with dict comprehensions
This was rewritten by the `dict_literals` fixer in `pyupgrade`. The last pass
over the code for this that I could find was a61ed1c2d7a7.
--- a/mercurial/copies.py Mon Jan 06 01:12:54 2025 -0500
+++ b/mercurial/copies.py Mon Jan 06 01:20:01 2025 -0500
@@ -307,7 +307,7 @@
# revision that will be relevant for a edge of the graph. So if a
# children has parent not in `children_count`, that edges should not be
# processed.
- children_count = dict((r, 0) for r in roots)
+ children_count = {r: 0 for r in roots}
for r in revs:
for p in cl.parentrevs(r):
if p == nullrev:
@@ -329,7 +329,7 @@
else:
# When not using side-data, we will process the edges "from" the parent.
# so we need a full mapping of the parent -> children relation.
- children = dict((r, []) for r in roots)
+ children = {r: [] for r in roots}
for r in revs:
for p in cl.parentrevs(r):
if p == nullrev:
--- a/mercurial/debugcommands.py Mon Jan 06 01:12:54 2025 -0500
+++ b/mercurial/debugcommands.py Mon Jan 06 01:20:01 2025 -0500
@@ -913,7 +913,7 @@
label = b' '.join(e[0] for e in entry)
format = b' '.join(e[1] for e in entry)
values = [e[3] for e in entry]
- data = dict((e[2], e[3]) for e in entry)
+ data = {e[2]: e[3] for e in entry}
fm.startitem()
fm.write(label, format, *values, **data)
fm.plain(b'\n')