def compatcallback(f):
    """ Compatibility callback decorator for older click version.

    Click 1.0 does not have a version string stored, so we need to
    use getattr here to be safe.
    """
    if getattr(click, '__version__', '0.0') >= '2.0':
        return f
    return update_wrapper(lambda ctx, value: f(ctx, None, value), f)
def compatcallback ( f ) : if getattr ( click , '__version__' , '0.0' ) >= '2.0' : return f return update_wrapper ( lambda ctx , value : f ( ctx , None , value ) , f )
Compatibility callback decorator for older click version.

    Click 1.0 does not have a version string stored, so we need to
    use getattr here to be safe.