def _determine_eq_order(cmp, eq, order):
    """
    Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
    values of eq and order.
    """
    if cmp is not None and any((eq is not None, order is not None)):
        raise ValueError("Don't mix `cmp` with `eq' and `order`.")

    # cmp takes precedence due to bw-compatibility.
    if cmp is not None:
        warnings.warn(_CMP_DEPRECATION, DeprecationWarning, stacklevel=3)

        return cmp, cmp

    # If left None, equality is on and ordering mirrors equality.
    if eq is None:
        eq = True

    if order is None:
        order = eq

    if eq is False and order is True:
        raise ValueError("`order` can only be True if `eq` is True too.")

    return eq, order

    Validate the combination of *cmp*, *eq*, and *order*. Derive the effective
    values of eq and order.
    
stackoverflow/venv/lib/python3.6/site-packages/attr/_make.py