micropython-lib/python-stdlib/argparse
Alessandro Gatti 7473d1d6e0 argparse: Add support for custom argument types.
This commit adds support for optional custom argument type validation to
argparse.ArgumentParser, allowing for shorter argument validation code
for both simple builtins and complex types.

For example, assuming that a particular command line argument must be an
integer, using "parser.add_argument('-a', type=int)" will make sure that
any value passed to that argument that cannot be converted into an
integer will trigger an argument validation error.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-12-05 13:52:45 +11:00
..
argparse.py argparse: Add support for custom argument types. 2025-12-05 13:52:45 +11:00
manifest.py argparse: Add support for custom argument types. 2025-12-05 13:52:45 +11:00
test_argparse.py argparse: Add support for custom argument types. 2025-12-05 13:52:45 +11:00