Closed iago-lito closed 6 months ago
Got it: I need to raise argparser.ArgumentTypeError
s instead.
This is unexpected since TypeError
and ValueError
are also supported by argparse
.
Should I close or leave this issue open until the three types of errors are handled?
Hi @iago-lito,
Thank you for raising this issue. Do you know if an implementation of this in pure argparse
would produce the same error? In other words, does tap
deviate from argparse
in the way it handles errors?
--JK
No indeed @martinjm97. Good catch. The problem is upstream: https://github.com/python/cpython/issues/74406 :)
Thank you for identifying this problem and finding the upstream issue!
When providing my custom parsing function with the
type
argument, like in the following:I would expect my error message to show up in case of failure, but here is the output I get from tap instead:
How can I get my error message displayed instead?