Get the first line number of ast element :param ast el: :rtype: int
(el)
| 8 | |
| 9 | |
| 10 | def lineno(el): |
| 11 | """ |
| 12 | Get the first line number of ast element |
| 13 | |
| 14 | :param ast el: |
| 15 | :rtype: int |
| 16 | """ |
| 17 | if isinstance(el, list): |
| 18 | el = el[0] |
| 19 | ret = el['loc']['start']['line'] |
| 20 | assert type(ret) == int |
| 21 | return ret |
| 22 | |
| 23 | |
| 24 | def walk(tree): |
no outgoing calls
no test coverage detected