Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
feat(Py): Added Python args/kwargs parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
beneboy committed Sep 2, 2019
1 parent 5e55bcb commit 2f4b927
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions py/stencila/schema/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ def parse_function_def(self, statement: ast.FunctionDef) -> None:

f.parameters.append(p)

if statement.args.vararg:
f.parameters.append(Parameter(statement.args.vararg.arg, required=False, repeats=True))

if statement.args.kwarg:
f.parameters.append(Parameter(statement.args.kwarg.arg, required=False, extends=True))

self.seen_vars.append(f.name)
self.declares.append(f)

Expand Down

0 comments on commit 2f4b927

Please sign in to comment.