(func, args, kwargs, *, debug=False, suffix='')
| 49 | |
| 50 | |
| 51 | def _format_callback(func, args, kwargs, *, debug=False, suffix=''): |
| 52 | if isinstance(func, functools.partial): |
| 53 | suffix = _format_args_and_kwargs(args, kwargs, debug=debug) + suffix |
| 54 | return _format_callback(func.func, func.args, func.keywords, |
| 55 | debug=debug, suffix=suffix) |
| 56 | |
| 57 | if hasattr(func, '__qualname__') and func.__qualname__: |
| 58 | func_repr = func.__qualname__ |
| 59 | elif hasattr(func, '__name__') and func.__name__: |
| 60 | func_repr = func.__name__ |
| 61 | else: |
| 62 | func_repr = repr(func) |
| 63 | |
| 64 | func_repr += _format_args_and_kwargs(args, kwargs, debug=debug) |
| 65 | if suffix: |
| 66 | func_repr += suffix |
| 67 | return func_repr |
| 68 | |
| 69 | |
| 70 | def extract_stack(f=None, limit=None): |
no test coverage detected
searching dependent graphs…