You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only alternative for such cases is to use the dict type, which prevents from checking the key names and types individually.
In the above example, the current alternative is:
defmain(aux_kwargs: dict):
aux(**aux_kwargs)
The text was updated successfully, but these errors were encountered:
A small note about this. jsonargparse already supports **kwargs without the need of type hinting. It does this via source code introspection. See classes-methods-and-functions and ast-resolver.
Hi,
Thanks for this great library! Extremely useful!!
🚀 Feature request
The idea here would be to support arguments with type
typing.TypedDict
.Motivation
This feature would be great when we want to get a dictionary instead of a namespace but still want to check the keys and types of its elements.
This could also allow checking the elements in
**kwargs
: https://peps.python.org/pep-0692/Pitch
For example, if a function calls another function, we could then pass arguments to the second one very easily:
Then we would be able to call:
Alternatives
Currently, the only alternative for such cases is to use the
dict
type, which prevents from checking the key names and types individually.In the above example, the current alternative is:
The text was updated successfully, but these errors were encountered: