def positive_int(value: str) -> int:
    """
    ``argparse`` argument type that checks that its value is a positive
    integer.
    """
    try:
        ivalue = int(value)
        assert ivalue > 0
    except (AssertionError, TypeError, ValueError):
        raise ArgumentTypeError(
            "{!r} is an invalid positive int".format(value))
    return ivalue
def positive_int ( value : str ) -> int : try : ivalue = int ( value ) assert ivalue > 0 except ( AssertionError , TypeError , ValueError ) : raise ArgumentTypeError ( "{!r} is an invalid positive int" . format ( value ) ) return ivalue
``argparse`` argument type that checks that its value is a positive
    integer.