MCPcopy Create free account
hub / github.com/SplootCode/splootcode / generateArgs

Function generateArgs

python/convert_ast.py:266–275  ·  view source on GitHub ↗
(arguments)

Source from the content-addressed store, hash-verified

264
265
266def generateArgs(arguments):
267 if len(arguments.posonlyargs) != 0:
268 raise Exception('Unsupported: postion-only arguments')
269 if arguments.vararg or arguments.kwarg:
270 raise Exception('Unsupported: *args and **kwargs function arguments')
271 if len(arguments.kwonlyargs) != 0:
272 raise Exception('Unsupported: Keyword-only arguments')
273 if len(arguments.defaults) != 0:
274 raise Exception('Unsupported: Default values for function arguments')
275 return [SplootNode('PY_IDENTIFIER', {}, {'identifier': a.arg}) for a in arguments.args]
276
277def generateFunction(func):
278 return SplootNode('PYTHON_FUNCTION_DECLARATION', {

Callers 1

generateFunctionFunction · 0.70

Calls 1

SplootNodeFunction · 0.70

Tested by

no test coverage detected