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

Function capitalize

mypy/messages.py:3275–3280  ·  view source on GitHub ↗

Capitalize the first character of a string.

(s: str)

Source from the content-addressed store, hash-verified

3273
3274
3275def capitalize(s: str) -> str:
3276 """Capitalize the first character of a string."""
3277 if s == "":
3278 return ""
3279 else:
3280 return s[0].upper() + s[1:]
3281
3282
3283def extract_type(name: str) -> str:

Callers

nothing calls this directly

Calls 1

upperMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…