Describe the bug
The current type handling using a dictionary is a bit bug-prone.
E.g., datedatetime or time are not included in NAMES as they do not represent primitive types strictly speaking, howver this introduces a two-fold problem.
including them in the type dictionary, makes argparse attempt the parsing itself instead of forwarding it to pydantic
not including them does not allow the definition of more descriptive metavars (i.e., DATE instead of TEXT)
To Reproduce
Simply defining a List[date] is enough.
Expected behavior
Date/time objects (and other complex standard and non-standard data types) should be "acknowledged", meaning that, if possible, argparse should be aware of them (at the very least using an ad-hoc metavar) but pydantic should take care of the heavy lifting.
Describe the bug The current type handling using a dictionary is a bit bug-prone. E.g.,
date
datetime
ortime
are not included inNAMES
as they do not represent primitive types strictly speaking, howver this introduces a two-fold problem.DATE
instead ofTEXT
)To Reproduce Simply defining a
List[date]
is enough.Expected behavior Date/time objects (and other complex standard and non-standard data types) should be "acknowledged", meaning that, if possible, argparse should be aware of them (at the very least using an ad-hoc metavar) but pydantic should take care of the heavy lifting.