-
-
Notifications
You must be signed in to change notification settings - Fork 329
Replace redundant list comprehension with generator #3040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tests/test_group.py
Outdated
x | ||
async for x in create_hierarchy( | ||
store=store, nodes={"node": new_metadata}, overwrite=False | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI fails with:
FAILED tests/test_group.py::test_create_hierarchy_existing_nodes[zarr2-async-array-memory] - TypeError: 'async_generator' object is not iterable
FAILED tests/test_group.py::test_create_hierarchy_existing_nodes[zarr2-async-group-memory] - TypeError: 'async_generator' object is not iterable
FAILED tests/test_group.py::test_create_hierarchy_existing_nodes[zarr3-async-array-memory] - TypeError: 'async_generator' object is not iterable
FAILED tests/test_group.py::test_create_hierarchy_existing_nodes[zarr3-async-group-memory] - TypeError: 'async_generator' object is not iterable
I think I need to change tuple(
into await tuple(
:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this cannot work. There is no such thing as a "tuple comprehension":
Aggregating an async generator to a tuple
Head branch was pushed to by a user without write access
273f16a
to
4db0587
Compare
4db0587
to
901610d
Compare
There is no such thing as a "tuple comprehension": https://stackoverflow.com/questions/52285419/aggregating-an-async-generator-to-a-tuple#52285420 Fixes CI error: FAILED tests/test_group.py::test_create_hierarchy_existing_nodes[zarr2-async-array-memory] - TypeError: 'async_generator' object is not iterable
901610d
to
9341f6e
Compare
TODO:
docs/user-guide/*.rst
changes/