(func)
| 8 | |
| 9 | |
| 10 | def _get_function_source(func): |
| 11 | func = inspect.unwrap(func) |
| 12 | if inspect.isfunction(func): |
| 13 | code = func.__code__ |
| 14 | return (code.co_filename, code.co_firstlineno) |
| 15 | if isinstance(func, functools.partial): |
| 16 | return _get_function_source(func.func) |
| 17 | if isinstance(func, functools.partialmethod): |
| 18 | return _get_function_source(func.func) |
| 19 | return None |
| 20 | |
| 21 | |
| 22 | def _format_callback_source(func, args, *, debug=False): |
no test coverage detected
searching dependent graphs…