messages/cli.py
def trim_args(kwds):
    """Gets rid of args with value of None, as well as select keys."""
    reject_key = ("type", "types", "configure")
    reject_val = (None, ())
    kwargs = {
        k: v for k, v in kwds.items() if k not in reject_key and v not in reject_val
    }
    for k, v in kwargs.items():
        if k in ("to", "cc", "bcc", "attachments"):
            kwargs[k] = list(kwargs[k])
    return kwargs
def trim_args(kwds):
    """Gets rid of args with value of None, as well as select keys."""
    reject_key = ("type", "types", "configure")
    reject_val = (None, ())
    kwargs = {
        k: v for k, v in kwds.items() if k not in reject_key and v not in reject_val
    }
    for k, v in kwargs.items():
        if k in ("to", "cc", "bcc", "attachments"):
            kwargs[k] = list(kwargs[k])
    return kwargs
def trim_args ( kwds ) : reject_key = ( "type" , "types" , "configure" ) reject_val = ( None , ( ) ) kwargs = { k : v for k , v in kwds . items ( ) if k not in reject_key and v not in reject_val } for k , v in kwargs . items ( ) : if k in ( "to" , "cc" , "bcc" , "attachments" ) : kwargs [ k ] = list ( kwargs [ k ] ) return kwargs
Gets rid of args with value of None, as well as select keys.
Gets rid of args with value of None as well as select keys .