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

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

    Helper function to validate a year coming from the CLI.

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

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