MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / _wrap_as_variables

Function _wrap_as_variables

code2flow/model.py:439–447  ·  view source on GitHub ↗

Given a list of either Nodes or Groups, wrap them in variables. This is used in the get_variables method to allow all defined functions and classes to be defined as variables :param list[Group|Node] sequence: :rtype: list[Variable]

(sequence)

Source from the content-addressed store, hash-verified

437
438
439def _wrap_as_variables(sequence):
440 """
441 Given a list of either Nodes or Groups, wrap them in variables.
442 This is used in the get_variables method to allow all defined
443 functions and classes to be defined as variables
444 :param list[Group|Node] sequence:
445 :rtype: list[Variable]
446 """
447 return [Variable(el.token, el, el.line_number) for el in sequence]
448
449
450class Edge():

Callers 1

get_variablesMethod · 0.85

Calls 1

VariableClass · 0.85

Tested by

no test coverage detected