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

Function _truncate

mypy/stubtest.py:85–88  ·  view source on GitHub ↗
(message: str, length: int)

Source from the content-addressed store, hash-verified

83
84
85def _truncate(message: str, length: int) -> str:
86 if len(message) > length:
87 return message[: length - 3] + "..."
88 return message
89
90
91class StubtestFailure(Exception):

Callers 1

__init__Method · 0.85

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…