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

.with_materializers() added helpful error message #986

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented Jun 25, 2024

When first using .with_materializers(), it's not obvious that it expects:

.with_materializers(to.json(...), to.parquet(...))

Rather than the invalid:

.with_materializers([to.json(...), to.parquet(...)])

If encountering the above case, the error will now specify to unpack the sequence with *, leading to the valid code

.with_materializers(*[to.json(...), to.parquet(...)])

Changes

  • explicitly catch an invalid argument for .with_materializers() when building the driver

@zilto zilto added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 25, 2024
Copy link
Collaborator

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a unit test for this please.

@skrawcz skrawcz merged commit b836e19 into main Jun 27, 2024
23 checks passed
@skrawcz skrawcz deleted the fix/better-with-materializer-error branch June 27, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants