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

Function count_stats

mypy/util.py:502–507  ·  view source on GitHub ↗

Count total number of errors, notes and error_files in message list.

(messages: list[str])

Source from the content-addressed store, hash-verified

500
501
502def count_stats(messages: list[str]) -> tuple[int, int, int]:
503 """Count total number of errors, notes and error_files in message list."""
504 errors = [e for e in messages if ": error:" in e]
505 error_files = {e.split(":")[0] for e in errors}
506 notes = [e for e in messages if ": note:" in e]
507 return len(errors), len(notes), len(error_files)
508
509
510def split_words(msg: str) -> list[str]:

Callers 2

pretty_messagesMethod · 0.90

Calls 2

lenFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…