-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
It might be useful to provide some kind of error classes as part of this package.
For example, I use code like this:
from argparse import ArgumentError, ArgumentParser
def file_path(x: str):
d = Path(x)
if d.is_dir:
raise ArgumentError(f"{d} is a directory")
return d
parser = ArgumentParser()
parser.add_argument('output_file', type=file_path, help="Path to output file")
parser.parse_args()I would like to use TAP for this, so would be nice to import all the classes I need from the single package, rather than still importing error classes from argparse, or writing my own each time.
The easiest would probably be to just expose the classes from argparse.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers