(self, source: "Source")
| 700 | ) |
| 701 | |
| 702 | def _getindent(self, source: "Source") -> int: |
| 703 | # Figure out indent for the given source. |
| 704 | try: |
| 705 | s = str(source.getstatement(len(source) - 1)) |
| 706 | except KeyboardInterrupt: |
| 707 | raise |
| 708 | except BaseException: |
| 709 | try: |
| 710 | s = str(source[-1]) |
| 711 | except KeyboardInterrupt: |
| 712 | raise |
| 713 | except BaseException: |
| 714 | return 0 |
| 715 | return 4 + (len(s) - len(s.lstrip())) |
| 716 | |
| 717 | def _getentrysource(self, entry: TracebackEntry) -> Optional["Source"]: |
| 718 | source = entry.getsource(self.astcache) |
no test coverage detected