(linestarts)
| 871 | _NO_LINENO = ' --' |
| 872 | |
| 873 | def _get_lineno_width(linestarts): |
| 874 | if linestarts is None: |
| 875 | return 0 |
| 876 | maxlineno = max(filter(None, linestarts.values()), default=-1) |
| 877 | if maxlineno == -1: |
| 878 | # Omit the line number column entirely if we have no line number info |
| 879 | return 0 |
| 880 | lineno_width = max(3, len(str(maxlineno))) |
| 881 | if lineno_width < len(_NO_LINENO) and None in linestarts.values(): |
| 882 | lineno_width = len(_NO_LINENO) |
| 883 | return lineno_width |
| 884 | |
| 885 | def _get_positions_width(code): |
| 886 | # Positions are formatted as 'LINE:COL-ENDLINE:ENDCOL ' (note trailing space). |
no test coverage detected
searching dependent graphs…