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

Function extract_type

mypy/messages.py:3283–3289  ·  view source on GitHub ↗

If the argument is the name of a method (of form C.m), return the type portion in quotes (e.g. "y"). Otherwise, return the string unmodified.

(name: str)

Source from the content-addressed store, hash-verified

3281
3282
3283def extract_type(name: str) -> str:
3284 """If the argument is the name of a method (of form C.m), return
3285 the type portion in quotes (e.g. "y"). Otherwise, return the string
3286 unmodified.
3287 """
3288 name = re.sub('^"[a-zA-Z0-9_]+" of ', "", name)
3289 return name
3290
3291
3292def strip_quotes(s: str) -> str:

Callers 1

incompatible_argumentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…