In the following example i expect all arguments to be required:
import argclass
class BaseParser(argclass.Parser):
argument1: str # not ok, not required
argument2: str = argclass.Argument(required=True) # ok
class SuperParser(BaseParser):
argument3: str # ok
parser = SuperParser()
parser.parse_args()
Output:
usage: scratch_1.py [-h] [--argument1 ARGUMENT1] --argument2 ARGUMENT2
--argument3 ARGUMENT3
scratch_1.py: error: the following arguments are required: --argument2, --argument3
In the following example i expect all arguments to be required:
Output: