-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hello, I noticed that in version 1.3, the help method converts Python objects into a JSON structure. However, the current implementation prevents the use of UnionType in action definitions, which makes the args unable to be optional.
I looked at the code, and the main reason for this is:
# type
sig_annotation = signature.parameters[arg_name].annotation
if sig_annotation is not None and sig_annotation.__name__ != "_empty":When the argument type is a UnionType, sig_annotation does not have the __name__ attribute.
Is this a design decision?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request