(lst: list[str])
| 3297 | |
| 3298 | |
| 3299 | def format_string_list(lst: list[str]) -> str: |
| 3300 | assert lst |
| 3301 | if len(lst) == 1: |
| 3302 | return lst[0] |
| 3303 | elif len(lst) <= 5: |
| 3304 | return f"{', '.join(lst[:-1])} and {lst[-1]}" |
| 3305 | else: |
| 3306 | return "%s, ... and %s (%i methods suppressed)" % ( |
| 3307 | ", ".join(lst[:2]), |
| 3308 | lst[-1], |
| 3309 | len(lst) - 3, |
| 3310 | ) |
| 3311 | |
| 3312 | |
| 3313 | def format_item_name_list(s: Iterable[str]) -> str: |
no test coverage detected
searching dependent graphs…