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

Function get_inherits

code2flow/python.py:132–140  ·  view source on GitHub ↗

Get what superclasses this class inherits This handles exact names like 'MyClass' but skips things like 'cls' and 'mod.MyClass' Resolving those would be difficult :param tree ast: :rtype: list[str]

(tree)

Source from the content-addressed store, hash-verified

130
131
132def get_inherits(tree):
133 """
134 Get what superclasses this class inherits
135 This handles exact names like 'MyClass' but skips things like 'cls' and 'mod.MyClass'
136 Resolving those would be difficult
137 :param tree ast:
138 :rtype: list[str]
139 """
140 return [base.id for base in tree.bases if type(base) == ast.Name]
141
142
143class Python(BaseLanguage):

Callers 1

make_class_groupMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected