Format short summary in case of success. n_sources is total number of files passed directly on command line, i.e. excluding stubs and followed imports.
(self, n_sources: int, use_color: bool = True)
| 846 | return note[:start] + self.style(note[start:end], "none", underline=True) + note[end:] |
| 847 | |
| 848 | def format_success(self, n_sources: int, use_color: bool = True) -> str: |
| 849 | """Format short summary in case of success. |
| 850 | |
| 851 | n_sources is total number of files passed directly on command line, |
| 852 | i.e. excluding stubs and followed imports. |
| 853 | """ |
| 854 | if self.hide_success: |
| 855 | return "" |
| 856 | |
| 857 | msg = f"Success: no issues found in {n_sources} source file{plural_s(n_sources)}" |
| 858 | if not use_color: |
| 859 | return msg |
| 860 | return self.style(msg, "green", bold=True) |
| 861 | |
| 862 | def format_error( |
| 863 | self, |
no test coverage detected