Skip to content

Commit

Permalink
Update argparse_dataclass.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenWarnke committed Mar 2, 2023
1 parent 11cf9ef commit e3c6cd3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions argparse_dataclass.py
Expand Up @@ -369,8 +369,7 @@ def _add_dataclass_options(
if len(f_args) == 2 and NoneType in f_args:
arg = next(a for a in f_args if a is not NoneType)
kwargs["type"] = arg
else:
raise TypeError("Union types other than 'Optional' are not supported")

parser.add_argument(*args, **kwargs)


Expand Down

0 comments on commit e3c6cd3

Please sign in to comment.