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

Method get_constructor

code2flow/model.py:559–569  ·  view source on GitHub ↗

Return the first constructor for this group - if any TODO, this excludes the possibility of multiple constructors like __init__ vs __new__ :rtype: Node|None

(self)

Source from the content-addressed store, hash-verified

557 return ret
558
559 def get_constructor(self):
560 """
561 Return the first constructor for this group - if any
562 TODO, this excludes the possibility of multiple constructors like
563 __init__ vs __new__
564 :rtype: Node|None
565 """
566 assert self.group_type == GROUP_TYPE.CLASS
567 constructors = [n for n in self.nodes if n.is_constructor]
568 if constructors:
569 return constructors[0]
570
571 def all_groups(self):
572 """

Callers 1

matches_variableMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected