-
-
Notifications
You must be signed in to change notification settings - Fork 227
fix: Treat None
as UNSET
in query params for model properties, etc.
#421
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
Codecov Report
@@ Coverage Diff @@
## main #421 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 47
Lines 1549 1549
=========================================
Hits 1549 1549 Continue to review full report at Codecov.
|
I'm not sure I totally follow here. Is the goal to account for when someone disregards the type annotation and passes The checks at the end already strip out any |
@dbanty Yeah, I agree this is confusing. However, it's what we had decided to do in #285. Remember that I had initially implemented a solution that would change the type of non-nullable optional properties to allow I also forgot to link the issue closed here, which is #380. |
Codecov Report
@@ Coverage Diff @@
## main #421 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 47
Lines 1563 1563
=========================================
Hits 1563 1563 Continue to review full report at Codecov.
|
…tional query params [#421, #380]. Thanks @forest-benchling!
@forest-benchling I've opened #462 to replace this. It takes a slightly different strategy of just always treating nullable and not required as both of those things. That way the type annotations still match what we're expecting folks to pass in. Please review that when you get a chance to verify that it suits Benchling's needs. |
…tional query params [#421, #380]. Thanks @forest-benchling!
…tional query params [#421, #380]. Thanks @forest-benchling!
…tional query params [#421, #380]. Thanks @forest-benchling!
…tional query params [#421, #380]. Thanks @forest-benchling!
…tional query params [#421, #380, #462]. Thanks @forest-benchling!
Fixes some missing cases not covered by the original implementation in #331. In particular, properties with non-trivial serialization would crash when
None
was passed instead ofUNSET
.Closes #380.