Type hints like list[str]
for required arguments cause error
#154
Labels
bug
Something isn't working
list[str]
for required arguments cause error
#154
🐛 Bug report
Type hints for lists for required arguments break
--help
functionality (and probably more).To reproduce
Script
test.py
:-> Running:
python test.py --help
results inWhile running the same code instead with
def main(required_arg: list):
ordef main(required_arg: list[str] = None):
results in the expected help output.Expected behavior
Running the code with
def main(required_arg: list[str]):
should also print out the help message and not cause an error.Environment
jsonargparse = {extras = ["argcomplete", "signatures"], version = ">=4.12.0"}
The text was updated successfully, but these errors were encountered: