Summary
Currently, determining the type of a Union annotation for a command option does not take into account the fact that the union may contain the type of the default. The library only handles this special case when the union contains None and one other type.
The determine_union() code should be updated to attempt to remove the type of the default then determine the resulting union or type left. This generalizes the special-casing for None.
Summary
Currently, determining the type of a Union annotation for a command option does not take into account the fact that the union may contain the type of the default. The library only handles this special case when the union contains None and one other type.
The
determine_union()code should be updated to attempt to remove the type of the default then determine the resulting union or type left. This generalizes the special-casing for None.