Fix a bug when the only parameter of a function is a 'body' parameter
This commit is contained in:
parent
d71b762ae3
commit
daec0a54f1
@ -124,7 +124,11 @@ class FunctionDefinition(object):
|
|||||||
class signature(object):
|
class signature(object):
|
||||||
def __init__(self, *types, **options):
|
def __init__(self, *types, **options):
|
||||||
self.return_type = types[0] if types else None
|
self.return_type = types[0] if types else None
|
||||||
self.arg_types = types[1:] if len(types) > 1 else None
|
self.arg_types = []
|
||||||
|
if len(types) > 1:
|
||||||
|
self.arg_types.extend(types[1:])
|
||||||
|
if 'body' in options:
|
||||||
|
self.arg_types.append(options['body'])
|
||||||
self.wrap = options.pop('wrap', False)
|
self.wrap = options.pop('wrap', False)
|
||||||
self.options = options
|
self.options = options
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user