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

Use type for omit output if that's the struct's input #988

Merged
merged 1 commit into from
Mar 2, 2022
Merged

Use type for omit output if that's the struct's input #988

merged 1 commit into from
Mar 2, 2022

Conversation

IgnusG
Copy link
Contributor

@IgnusG IgnusG commented Dec 21, 2021

This change basically allows a type struct as input to omit to be preserved. It's not very useful for actual checking since type accepts anything (even the "omitted" key) but it does remove the key from the returned type and preserves the intuitive behavior behind type.

I believe this relates to #829 but it's missing implementations for pick and partial.

@ianstormtaylor
Copy link
Owner

Thanks for this @IgnusG! If you'd be down to write a PR for pick or partial I'd be happy to merge those as well.

@ianstormtaylor ianstormtaylor merged commit 4a4fc25 into ianstormtaylor:main Mar 2, 2022
@jon-certik
Copy link

Hi @ianstormtaylor, pick and partial have been fixed by PR #1149 and #1150. Would really appreciate it if these patches can be merged soon! Otherwise the current loopholes significantly undermine the usability of the library on complex types.

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

Successfully merging this pull request may close these issues.

3 participants