src/dirbs/cli/report.py
def _parse_positive_int(ctx: callable, param, value: str) -> int:
    """Helper function to parse a positive integer and return.

    Arguments:
        ctx: click context
        param: required param
        value: value to parse
    Returns:
        parsed_value: parsed integer value
    Raises:
        BadParameter: if value is less than or equal to 0 or not given or negative
    """
    try:
        if value is not None:
            parsed_value = int(value)
            if parsed_value <= 0:
                raise click.BadParameter('--period value must be greater than 0')
            return parsed_value
        raise click.BadParameter('--period is required')
    except ValueError:
        raise click.BadParameter('--period value must be positive integer')
Helper function to parse a positive integer and return.

    Arguments:
        ctx: click context
        param: required param
        value: value to parse
    Returns:
        parsed_value: parsed integer value
    Raises:
        BadParameter: if value is less than or equal to 0 or not given or negative
    
Helper function to parse a positive integer and return.
Helper function to parse a positive integer and return .
def _parse_positive_int(ctx: callable, param, value: str) -> int:
    try:
        if value is not None:
            parsed_value = int(value)
            if parsed_value <= 0:
                raise click.BadParameter('--period value must be greater than 0')
            return parsed_value
        raise click.BadParameter('--period is required')
    except ValueError:
        raise click.BadParameter('--period value must be positive integer')
def _parse_positive_int ( ctx : callable , param , value : str ) -> int : try : if value is not None : parsed_value = int ( value ) if parsed_value <= 0 : raise click . BadParameter ( '--period value must be greater than 0' ) return parsed_value raise click . BadParameter ( '--period is required' ) except ValueError : raise click . BadParameter ( '--period value must be positive integer' )
Helper function to parse a positive integer and return.
Helper function to parse a positive integer and return .
"""Helper function to parse a positive integer and return.

    Arguments:
        ctx: click context
        param: required param
        value: value to parse
    Returns:
        parsed_value: parsed integer value
    Raises:
        BadParameter: if value is less than or equal to 0 or not given or negative
    """
parsed integer value
parsed integer value
parsed_value
if value is less than or equal to 0 or not given or negative
if value is less than or equal to 0 or not given or negative
BadParameter
ctx
callable
None
param
None
value
str
value to parse
value to parse