args is a list not a tuple here
This commit is contained in:
parent
1548099388
commit
aa21245a19
|
@ -19,14 +19,14 @@ class Params:
|
|||
__slots__ = ('args', 'kwargs')
|
||||
def __init__(self, args=None, kwargs=None):
|
||||
if args is None:
|
||||
args = tuple()
|
||||
args = []
|
||||
if kwargs is None:
|
||||
kwargs = {}
|
||||
if isinstance(args, Param):
|
||||
args = (args,)
|
||||
else:
|
||||
if not isinstance(args, tuple):
|
||||
raise ValueError(_('args in params must be a tuple'))
|
||||
if not isinstance(args, list):
|
||||
raise ValueError(_('args in params must be a list'))
|
||||
for arg in args:
|
||||
if not isinstance(arg, Param):
|
||||
raise ValueError(_('arg in params must be a Param'))
|
||||
|
|
Loading…
Reference in New Issue