(self, func)
return wrapper
Wrapper for overridable methods to allow backwards compatibility
Wrapper for overridable methods to allow backwards compatibility
Wrapper for overridable methods to allow backwards compatibility
def _compatible(self, func):
        """Wrapper for overridable methods to allow backwards compatibility"""
        self._check_signature(func)

        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            if self._expects_item[func.__name__]:
                return func(*args, **kwargs)

            kwargs.pop('item', None)
            return func(*args, **kwargs)

        return wrapper
def _compatible ( self , func ) : self . _check_signature ( func ) @ functools . wraps ( func ) def wrapper ( * args , * * kwargs ) : if self . _expects_item [ func . __name__ ] : return func ( * args , * * kwargs ) kwargs . pop ( 'item' , None ) return func ( * args , * * kwargs ) return wrapper