(option, opt_str, value, parser)
Handle a provided --python-version value.
Handle a provided --python-version value.
Handle a provided -- python - version value .
def _handle_python_version(option, opt_str, value, parser):
    # type: (Option, str, str, OptionParser) -> None
    """
    Handle a provided --python-version value.
    """
    version_info, error_msg = _convert_python_version(value)
    if error_msg is not None:
        msg = (
            'invalid --python-version value: {!r}: {}'.format(
                value, error_msg,
            )
        )
        raise_option_error(parser, option=option, msg=msg)

    parser.values.python_version = version_info
def _handle_python_version ( option , opt_str , value , parser ) : # type: (Option, str, str, OptionParser) -> None version_info , error_msg = _convert_python_version ( value ) if error_msg is not None : msg = ( 'invalid --python-version value: {!r}: {}' . format ( value , error_msg , ) ) raise_option_error ( parser , option = option , msg = msg ) parser . values . python_version = version_info