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)
| 130 | |
| 131 | |
| 132 | def 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 | |
| 143 | class Python(BaseLanguage): |