Extract the block of code at the top of the given list of lines.
(obj)
| 176 | |
| 177 | |
| 178 | def getsourcelines(obj): |
| 179 | """Extract the block of code at the top of the given list of lines.""" |
| 180 | obj = inspect.unwrap(obj) |
| 181 | lines, l_num = findsource(obj) |
| 182 | return inspect.getblock(lines[l_num:]), l_num + 1 |
| 183 | |
| 184 | |
| 185 | inspect.getfile = _patched_inspect_getfile |
no test coverage detected
searching dependent graphs…