kopia lustrzana https://github.com/micropython/micropython-lib
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>
|
||
|---|---|---|
| .. | ||
| argparse.py | ||
| manifest.py | ||
| test_argparse.py | ||