Skip to content
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

Ensure Output.from_input({}) returns {} instead of [] #7254

Merged
merged 2 commits into from
Jun 9, 2021

Conversation

lukehoban
Copy link
Member

@lukehoban lukehoban commented Jun 9, 2021

Fixes #7252.

Subtly, Output.all(**{}) by design returns Output([]), because the all function itself cannot distinguish between this and Output.all(). So we must special case empty dicts to avoid calling all on them.

We were missing tests for empty arrays and dicts, so these have been added.

@lukehoban
Copy link
Member Author

The test failure appears to be unrelated - tracking that in #7255.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sdk/python] Output.from_input({}) regression - returns [] instead of {}
2 participants