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

Method __init__

code2flow/model.py:263–277  ·  view source on GitHub ↗
(self, token, calls, variables, parent, import_tokens=None,
                 line_number=None, is_constructor=False)

Source from the content-addressed store, hash-verified

261
262class Node():
263 def __init__(self, token, calls, variables, parent, import_tokens=None,
264 line_number=None, is_constructor=False):
265 self.token = token
266 self.line_number = line_number
267 self.calls = calls
268 self.variables = variables
269 self.import_tokens = import_tokens or []
270 self.parent = parent
271 self.is_constructor = is_constructor
272
273 self.uid = "node_" + os.urandom(4).hex()
274
275 # Assume it is a leaf and a trunk. These are modified later
276 self.is_leaf = True # it calls nothing else
277 self.is_trunk = True # nothing calls it
278
279 def __repr__(self):
280 return f"<Node token={self.token} parent={self.parent}>"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected