Uh oh!
There was an error while loading. Please reload this page.
UNSET values in repr are extremely verbose
#825
forest-benchling
started this conversation in
Feature request
Replies: 3 comments
Relevant PEP is still a draft, so, we'll be stuck with |
0 replies
Maybe it's possible to rely on pydantics unset? |
0 replies
A sentinal will be useful later, but defining classUnset:
def__bool__(self) ->Literal[False]:
returnFalsedef__str__(self) ->str:
return"<UNSET>"def__repr__(self) ->str:
return"UNSET" |
0 replies
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
When printing out models, we often get extremely verbose strings, such as:
This makes debugging much more challenging.
Describe the solution you'd like
Ideally it would print
Describe alternatives you've considered
It would also be an improvement if the repr of
UNSETitself was shortened. I know @dbanty mentioned a PEP a while back that would allow us to make it a sentinel.Additional context
cc @GitOnUp
All reactions