def _is_compat_stream_attr(stream, attr, value):
    """A stream attribute is compatible if it is equal to the
    desired value or the desired value is unset and the attribute
    has a value.
    """
    stream_value = getattr(stream, attr, None)
    return stream_value == value or (value is None and stream_value is not None)
A stream attribute is compatible if it is equal to the
    desired value or the desired value is unset and the attribute
    has a value.
    
dynaconf/vendor/click/_compat.py