Get the call line from within a function.
()
| 437 | |
| 438 | |
| 439 | def _get_call_line(): |
| 440 | """Get the call line from within a function.""" |
| 441 | frame = inspect.currentframe().f_back.f_back |
| 442 | if _verbose_dec_re.search(frame.f_code.co_filename): |
| 443 | frame = frame.f_back |
| 444 | context = inspect.getframeinfo(frame).code_context |
| 445 | context = "unknown" if context is None else context[0].strip() |
| 446 | return context |
| 447 | |
| 448 | |
| 449 | def filter_out_warnings(warn_record, category=None, match=None): |
no outgoing calls