(obj)
| 104 | return None |
| 105 | |
| 106 | def getsourcelines(obj): |
| 107 | lines, lineno = inspect.findsource(obj) |
| 108 | if inspect.isframe(obj) and obj.f_globals is obj.f_locals: |
| 109 | # must be a module frame: do not try to cut a block out of it |
| 110 | return lines, 1 |
| 111 | elif inspect.ismodule(obj): |
| 112 | return lines, 1 |
| 113 | return inspect.getblock(lines[lineno:]), lineno+1 |
| 114 | |
| 115 | def lasti2lineno(code, lasti): |
| 116 | linestarts = list(dis.findlinestarts(code)) |
no outgoing calls
no test coverage detected