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

Function call_singledispatch_function_callback

mypy/plugins/singledispatch.py:206–213  ·  view source on GitHub ↗

Called for functools._SingleDispatchCallable.__call__

(ctx: MethodSigContext)

Source from the content-addressed store, hash-verified

204
205
206def call_singledispatch_function_callback(ctx: MethodSigContext) -> FunctionLike:
207 """Called for functools._SingleDispatchCallable.__call__"""
208 if not isinstance(ctx.type, Instance):
209 return ctx.default_signature
210 metadata = get_singledispatch_info(ctx.type)
211 if metadata is None:
212 return ctx.default_signature
213 return metadata.fallback

Callers

nothing calls this directly

Calls 2

isinstanceFunction · 0.85
get_singledispatch_infoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…