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

Function generateImportFrom

python/convert_ast.py:260–263  ·  view source on GitHub ↗
(astImport)

Source from the content-addressed store, hash-verified

258
259
260def generateImportFrom(astImport):
261 module = SplootNode('PYTHON_MODULE_IDENTIFIER', {}, {'identifier': astImport.module})
262 attrs = [SplootNode('PY_IDENTIFIER', {}, {'identifier': n.name}) for n in astImport.names]
263 return SplootNode('PYTHON_FROM_IMPORT', {'module': [module], 'attrs': attrs})
264
265
266def generateArgs(arguments):

Callers 1

generateSplootStatementFunction · 0.85

Calls 1

SplootNodeFunction · 0.70

Tested by

no test coverage detected