Depending on the type of element, get the body of that element :param tree_el ast: :rtype: list[tree_el]
(tree_el)
| 149 | |
| 150 | |
| 151 | def get_tree_body(tree_el): |
| 152 | """ |
| 153 | Depending on the type of element, get the body of that element |
| 154 | |
| 155 | :param tree_el ast: |
| 156 | :rtype: list[tree_el] |
| 157 | """ |
| 158 | |
| 159 | if tree_el[0] == 'module': |
| 160 | body_struct = tree_el[2] |
| 161 | elif tree_el[0] == 'defs': |
| 162 | body_struct = tree_el[4] |
| 163 | else: |
| 164 | body_struct = tree_el[3] |
| 165 | return as_lines(body_struct) |
| 166 | |
| 167 | |
| 168 | def get_inherits(tree, body_tree): |
no test coverage detected