import click


def eval_option(**kwargs):
    """Get option flag to say if eval-scores are provided"""

    def custom_eval_option(func):
        def callback(ctx, param, value):
            ctx.meta["evaluation"] = value
            return value

        return click.option(
            "-e",
            "--eval",
            "evaluation",
            is_flag=True,
            default=False,
            show_default=True,
            help="If set, evaluation scores must be provided",
            callback=callback,
            **kwargs
        )(func)

    return custom_eval_option