-
Notifications
You must be signed in to change notification settings - Fork 27
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
Option name disappears with OmitArgPrefixes #185
Comments
Hi @KrobotP, thanks for filing this issue! This seems like expected behavior with the current API, since I have a design revision in mind for the "custom constructor" API which should be much more flexible and cover this use case. I think I can have it done within a week but time is tight so it's hard to make promises. A workaround right now is to skip the custom constructor API, add |
Hi @brentyi, thanks for the clarification and a workaround. However, changing types is not possible as other stuff depends on it. But its OK for me to stick with prefixes for a while if there is a hope for better future :). |
One more idea to def add_spec(spec: Annotated[MySpec, tyro.conf.OmitArgPrefixes]):
print(spec.here_comes_the_trouble) will remove only |
Yeah I see! This will work for "erasing"
I've learned a lot from working with the current iteration of the |
Let me just demonstrate the issue on example. Having following data structures:
Now I build an application:
and everything works as expected:
Now, I would like to remove
spec.
prefixes, so I usetyro.conf.OmitArgPrefixes
:Now,
here-comes-the-trouble
has been consumed together with its prefix:The text was updated successfully, but these errors were encountered: