Commit c06b693f authored by Tom Niget's avatar Tom Niget

Fix handling of functions with no required parameters

parent 6ecfe8a2
......@@ -66,7 +66,7 @@ class BlockVisitor(NodeVisitor):
yield f"{node.name}_inner::"
yield "operator()"
yield "("
padded_defaults = [None] * (node.type.optional_at or len(node.args.args)) + node.args.defaults
padded_defaults = [None] * (len(node.args.args) if node.type.optional_at is None else node.type.optional_at) + node.args.defaults
args_iter = zip(node.args.args, node.type.parameters, padded_defaults)
if skip_first_arg:
next(args_iter)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment