def _check_no_input(message):
    # type: (str) -> None
    """Raise an error if no input is allowed."""
    if os.environ.get('PIP_NO_INPUT'):
        raise Exception(
            'No input was expected ($PIP_NO_INPUT set); question: {}'.format(
                message)
        )
Raise an error if no input is allowed.
product/gradle-plugin/src/main/python/pip/_internal/utils/misc.py