deepaugment/lib/decorators.py
def check_df_arg_nonempty_at(func, argorder=1):
    """Decorator checks if the argument of the decorated function  is not empty.

    It does the same thing with "check_arg_nonempty()" decorator, except it checks the argument
    whose order is given (argorder), instead of checking the first argument

    Args:
        argorder (int): order of the given argument.
    """

    @wraps(func)
    def wrapper(*args, **kwargs):

        catch = args[argorder]
        assert catch is not None, "args[{}] shouldnot be None".format(argorder)
        assert len(catch) > 0, "args[{}] size should be larger than 0".format(argorder)

        rv = func(*args, **kwargs)
        return rv

    return wrapper
Decorator checks if the argument of the decorated function  is not empty.

    It does the same thing with "check_arg_nonempty()" decorator, except it checks the argument
    whose order is given (argorder), instead of checking the first argument

    Args:
        argorder (int): order of the given argument.
    
Decorator checks if the argument of the decorated function  is not empty.
It does the same thing with "check_arg_nonempty()" decorator, except it checks the argument
whose order is given (argorder), instead of checking the first argument
Decorator checks if the argument of the decorated function is not empty . It does the same thing with " check_arg_nonempty () " decorator except it checks the argument whose order is given ( argorder ) instead of checking the first argument
def check_df_arg_nonempty_at(func, argorder=1):
    @wraps(func)
    def wrapper(*args, **kwargs):
        catch = args[argorder]
        assert catch is not None, "args[{}] shouldnot be None".format(argorder)
        assert len(catch) > 0, "args[{}] size should be larger than 0".format(argorder)
        rv = func(*args, **kwargs)
        return rv
    return wrapper
def check_df_arg_nonempty_at ( func , argorder = 1 ) : @ wraps ( func ) def wrapper ( * args , ** kwargs ) : catch = args [ argorder ] assert catch is not None , "args[{}] shouldnot be None" . format ( argorder ) assert len ( catch ) > 0 , "args[{}] size should be larger than 0" . format ( argorder ) rv = func ( * args , ** kwargs ) return rv return wrapper
Decorator checks if the argument of the decorated function  is not empty.
Decorator checks if the argument of the decorated function is not empty .
"""Decorator checks if the argument of the decorated function  is not empty.

    It does the same thing with "check_arg_nonempty()" decorator, except it checks the argument
    whose order is given (argorder), instead of checking the first argument

    Args:
        argorder (int): order of the given argument.
    """
func
argorder
order of the given argument.
order of the given argument .