Skip to content

Conversation

@cbrewster
Copy link
Member

Why

River does not distinguish between None and unset, its nice to not have to manually specify None everywhere.

What changed

  • Wrap optional field types with NotRequired

Test plan

  • All optional fields on input TypedDicts should have NotRequired and they should not be required

@cbrewster cbrewster requested a review from a team as a code owner November 27, 2024 21:53
@cbrewster
Copy link
Member Author

cbrewster commented Nov 27, 2024

Current dependencies on/for this PR:

This comment was autogenerated by Freephite.

@cbrewster cbrewster requested review from jackyzha0 and removed request for a team November 27, 2024 21:53
Copy link
Contributor

@blast-hardcheese blast-hardcheese left a comment

Choose a reason for hiding this comment

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

thanks!

@blast-hardcheese blast-hardcheese added the enhancement New feature or request label Nov 28, 2024
@cbrewster cbrewster force-pushed the 11-27-Make_optional_input_fields_NotRequired branch 2 times, most recently from 4e8ba4f to 756c556 Compare January 6, 2025 20:39
@cbrewster cbrewster force-pushed the 11-27-Make_optional_input_fields_NotRequired branch from 756c556 to 7efabc8 Compare January 6, 2025 20:53
@cbrewster
Copy link
Member Author

Getting back to this, I had to fix a couple other things in the codegen, but this should work now!

Copy link
Contributor

@blast-hardcheese blast-hardcheese left a comment

Choose a reason for hiding this comment

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

Slick!

@cbrewster cbrewster added the minor Bump minor version label Jan 6, 2025
@cbrewster cbrewster merged commit 7d011c7 into main Jan 6, 2025
3 checks passed
@cbrewster cbrewster deleted the 11-27-Make_optional_input_fields_NotRequired branch January 6, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor Bump minor version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants