MCPcopy
hub / github.com/python/mypy / plural_s

Function plural_s

mypy/util.py:920–925  ·  view source on GitHub ↗
(s: int | Sized)

Source from the content-addressed store, hash-verified

918
919
920def plural_s(s: int | Sized) -> str:
921 count = s if isinstance(s, int) else len(s)
922 if count != 1:
923 return "s"
924 else:
925 return ""
926
927
928def quote_docstring(docstr: str) -> str:

Callers 7

test_stubsFunction · 0.90
append_union_noteFunction · 0.90
format_successMethod · 0.85
format_errorMethod · 0.85

Calls 2

isinstanceFunction · 0.85
lenFunction · 0.85

Tested by 1

test_stubsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…