import click


def prompt(*args, none_if_default=False, default=None, **kwargs):
    """
    Prompts a user for input.

    This is simply a wrapper around click.prompt() to provide the option to
    return None in the case that the prompt returns the default.

    Args:
        *args: positional arguments to pass directly to `click.prompt()`.
        none_if_default (bool): if True then None will be returned in the case
            that the returned value is the same as the default.
        default: the input to default to if the user inputs nothing. This is
            passed directly to `click.prompt()`.
        **kwargs: keyword arguments to pass directly to `click.prompt()`.

    Returns:
        the user input.
    """
    result = click.prompt(*args, default=default, **kwargs)

    if not none_if_default or result != default:
        return result