args is a list not a tuple here

This commit is contained in:
Emmanuel Garette 2018-04-16 10:39:25 +02:00
parent 1548099388
commit aa21245a19
1 changed files with 3 additions and 3 deletions

View File

@ -19,14 +19,14 @@ class Params:
__slots__ = ('args', 'kwargs') __slots__ = ('args', 'kwargs')
def __init__(self, args=None, kwargs=None): def __init__(self, args=None, kwargs=None):
if args is None: if args is None:
args = tuple() args = []
if kwargs is None: if kwargs is None:
kwargs = {} kwargs = {}
if isinstance(args, Param): if isinstance(args, Param):
args = (args,) args = (args,)
else: else:
if not isinstance(args, tuple): if not isinstance(args, list):
raise ValueError(_('args in params must be a tuple')) raise ValueError(_('args in params must be a list'))
for arg in args: for arg in args:
if not isinstance(arg, Param): if not isinstance(arg, Param):
raise ValueError(_('arg in params must be a Param')) raise ValueError(_('arg in params must be a Param'))