MCPcopy Index your code
hub / github.com/python/cpython / repl

Function repl

Lib/inspect.py:1367–1369  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

1365 return annotation
1366 if getattr(annotation, '__module__', None) == 'typing':
1367 def repl(match):
1368 text = match.group()
1369 return text.removeprefix('typing.')
1370 return re.sub(r'[\w\.]+', repl, repr(annotation))
1371 if isinstance(annotation, types.GenericAlias):
1372 return str(annotation)

Callers

nothing calls this directly

Calls 2

groupMethod · 0.45
removeprefixMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…