src/dirbs/cli/report.py
def _validate_month(ctx, param, val: int) -> int:
    """
    Helper function to validate a month coming from the CLI.

    Arguments:
        ctx: click cmd context
        param: required default parameter
        val: value to validate (month between 1-12)
    Returns:
        val: validated month value
    Raises:
        click.BadParameter: When month value does not lie in between 1-12
    """
    if val < 1 or val > 12:
        raise click.BadParameter('Month must be between 1 and 12')
    return val

    Helper function to validate a month coming from the CLI.

    Arguments:
        ctx: click cmd context
        param: required default parameter
        val: value to validate (month between 1-12)
    Returns:
        val: validated month value
    Raises:
        click.BadParameter: When month value does not lie in between 1-12
    
Helper function to validate a month coming from the CLI.
Helper function to validate a month coming from the CLI .
def _validate_month(ctx, param, val: int) -> int:
    if val < 1 or val > 12:
        raise click.BadParameter('Month must be between 1 and 12')
    return val
def _validate_month ( ctx , param , val : int ) -> int : if val < 1 or val > 12 : raise click . BadParameter ( 'Month must be between 1 and 12' ) return val
Helper function to validate a month coming from the CLI.
Helper function to validate a month coming from the CLI .
"""
    Helper function to validate a month coming from the CLI.

    Arguments:
        ctx: click cmd context
        param: required default parameter
        val: value to validate (month between 1-12)
    Returns:
        val: validated month value
    Raises:
        click.BadParameter: When month value does not lie in between 1-12
    """
validated month value
validated month value
val
When month value does not lie in between 1-12
When month value does not lie in between 1 - 12
click.BadParameter
ctx
click cmd context
click cmd context
param
required default parameter
required default parameter
val
int
value to validate (month between 1-12)
value to validate ( month between 1 - 12 )