neighthan / auto-argparse

Automatically create argparse parsers.
MIT License
2 stars 1 forks source link

Support Optional types. #2

Closed neighthan closed 4 years ago

neighthan commented 4 years ago

E.g. Optional[float]=None. Define a new "type" function so that we can handle the input - if it's "None", return None, otherwise return float(inp) (or whatever type was used instead of float).

neighthan commented 4 years ago

Fixed by 921589ec952f74cacb44009709b5a06c1432e4f9.