import click


def validate_positive_non_zero_integer(ctx, param, value):  # pylint: disable=unused-argument,invalid-name
    """Validate that `value` is a positive integer."""
    if not isinstance(value, int):
        raise click.BadParameter('{} is not an integer'.format(value))

    if value <= 0:
        raise click.BadParameter('{} is not a positive non-zero integer'.format(value))

    return value