(a: str, b: str, c: str = None, d: str = None, e: str = None, link: bool = True, column_width=None)
| 137 | |
| 138 | |
| 139 | def fmt(a: str, b: str, c: str = None, d: str = None, e: str = None, link: bool = True, column_width=None) -> str: |
| 140 | if column_width is None: |
| 141 | column_width = [40, 10, 5, 7, 7, 8] |
| 142 | ret = a |
| 143 | while len(ret) < column_width[0]: |
| 144 | ret += ' ' |
| 145 | if len(ret) == column_width[0]: |
| 146 | ret += ' ' + b[:10] |
| 147 | while len(ret) < (column_width[0] + 1 + column_width[1]): |
| 148 | ret += ' ' |
| 149 | ret += ' ' |
| 150 | if len(b) > 10: |
| 151 | ret += b[-5:].rjust(column_width[2]) + ' ' |
| 152 | if c is not None: |
| 153 | ret += c.rjust(column_width[3]) + ' ' |
| 154 | if d is not None: |
| 155 | ret += d.rjust(column_width[4]) + ' ' |
| 156 | if e is not None: |
| 157 | ret += e.rjust(column_width[5]) |
| 158 | if link: |
| 159 | pos = ret.find(' ') |
| 160 | ret = '<a href="' + a + '">' + a + '</a>' + ret[pos:] |
| 161 | return ret |
| 162 | |
| 163 | |
| 164 | def latestReport(latestResults: list) -> str: |
no test coverage detected