Skip to content

Commit 213863b

Browse files
Use a dictionary comprehension instead (#3029)
1 parent 0b97e78 commit 213863b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/test_group.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,14 +1583,12 @@ async def test_create_hierarchy(
15831583
sync_group.create_hierarchy(store=store, nodes=hierarchy_spec, overwrite=overwrite)
15841584
)
15851585
elif impl == "async":
1586-
created = dict(
1587-
[
1588-
a
1589-
async for a in create_hierarchy(
1590-
store=store, nodes=hierarchy_spec, overwrite=overwrite
1591-
)
1592-
]
1593-
)
1586+
created = {
1587+
k: v
1588+
async for k, v in create_hierarchy(
1589+
store=store, nodes=hierarchy_spec, overwrite=overwrite
1590+
)
1591+
}
15941592
else:
15951593
raise ValueError(f"Invalid impl: {impl}")
15961594
if not overwrite:

0 commit comments

Comments
 (0)