diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-01-10 16:11:22 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-01-25 10:37:27 -0800 |
commit | 03371459f0372f312073b7af84f5754526d04f10 (patch) | |
tree | 1605a95b3fb4b79c2bf3aa16d8ebe09d36f56e6a /alot/__main__.py | |
parent | 4ea6a8df3dcbcef3209f86df1f27366fbb20440c (diff) |
alot/utils/argparse: Add a new argparse validators infrastructure
This adds a new argparse.Action class validates input using a new
keyword argument that takes a validator function. This will allow us to
replace the use the type keyword as a validator, which is both more
correct, and frees up the type keyword to do what it's actually meant to
do, convert the input from one type to another.
It also adds 3 new validator functions that will be enabled in the next
commit. One that checks for a required file, one that checks for an
optional directory, and one that looks for a required file, fifo, or
block special device (/dev/null).
Diffstat (limited to 'alot/__main__.py')
0 files changed, 0 insertions, 0 deletions