MCPcopy Index your code
hub / github.com/python/mypy / format_success

Method format_success

mypy/util.py:848–860  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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,

Callers 2

mainFunction · 0.95
pretty_messagesMethod · 0.80

Calls 2

styleMethod · 0.95
plural_sFunction · 0.85

Tested by

no test coverage detected