src/dirbs/utils.py
def compute_amnesty_flags(app_config, curr_date):
    """
    Helper function to determine whether the date falls within amnesty eval or amnesty period.

    Arguments:
        app_config: dirbs app config object
        curr_date: current date of the system
    Returns:
        bool,bool
    """
    in_amnesty_eval_period = True if app_config.amnesty_config.amnesty_enabled and \
        curr_date <= app_config.amnesty_config.evaluation_period_end_date else False
    in_amnesty_period = True if app_config.amnesty_config.amnesty_enabled and \
        curr_date > app_config.amnesty_config.evaluation_period_end_date and \
        curr_date <= app_config.amnesty_config.amnesty_period_end_date else False
    return in_amnesty_eval_period, in_amnesty_period

    Helper function to determine whether the date falls within amnesty eval or amnesty period.

    Arguments:
        app_config: dirbs app config object
        curr_date: current date of the system
    Returns:
        bool,bool
    
Helper function to determine whether the date falls within amnesty eval or amnesty period.
Helper function to determine whether the date falls within amnesty eval or amnesty period .
def compute_amnesty_flags(app_config, curr_date):
    in_amnesty_eval_period = True if app_config.amnesty_config.amnesty_enabled and \
        curr_date <= app_config.amnesty_config.evaluation_period_end_date else False
    in_amnesty_period = True if app_config.amnesty_config.amnesty_enabled and \
        curr_date > app_config.amnesty_config.evaluation_period_end_date and \
        curr_date <= app_config.amnesty_config.amnesty_period_end_date else False
    return in_amnesty_eval_period, in_amnesty_period
def compute_amnesty_flags ( app_config , curr_date ) : in_amnesty_eval_period = True if app_config . amnesty_config . amnesty_enabled and curr_date <= app_config . amnesty_config . evaluation_period_end_date else False in_amnesty_period = True if app_config . amnesty_config . amnesty_enabled and curr_date > app_config . amnesty_config . evaluation_period_end_date and curr_date <= app_config . amnesty_config . amnesty_period_end_date else False return in_amnesty_eval_period , in_amnesty_period
Helper function to determine whether the date falls within amnesty eval or amnesty period.
Helper function to determine whether the date falls within amnesty eval or amnesty period .
"""
    Helper function to determine whether the date falls within amnesty eval or amnesty period.

    Arguments:
        app_config: dirbs app config object
        curr_date: current date of the system
    Returns:
        bool,bool
    """
None
app_config
dirbs app config object
dirbs app config object
curr_date
current date of the system
current date of the system