mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE]: Apply ruff PERF403 to use dict comprehensions more often (#149257)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/149257 Approved by: https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
811f587d86
commit
a0ac63cbd9
@ -2324,9 +2324,7 @@ class TestFX(JitTestCase):
|
||||
|
||||
copied_graph = copy.deepcopy(g)
|
||||
|
||||
val_map = {}
|
||||
for orig_node, new_node in zip(g.nodes, copied_graph.nodes):
|
||||
val_map[orig_node] = new_node
|
||||
val_map = dict(zip(g.nodes, copied_graph.nodes))
|
||||
|
||||
for orig_node, new_node in zip(g.nodes, copied_graph.nodes):
|
||||
orig_users = set(orig_node.users.keys())
|
||||
|
Reference in New Issue
Block a user