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

Function is_probably_a_function

mypy/stubtest.py:1851–1864  ·  view source on GitHub ↗
(runtime: Any)

Source from the content-addressed store, hash-verified

1849
1850
1851def is_probably_a_function(runtime: Any) -> bool:
1852 return (
1853 isinstance(
1854 runtime,
1855 (
1856 types.FunctionType,
1857 types.BuiltinFunctionType,
1858 types.MethodType,
1859 types.BuiltinMethodType,
1860 ),
1861 )
1862 or (inspect.ismethoddescriptor(runtime) and callable(runtime))
1863 or (isinstance(runtime, types.MethodWrapperType) and callable(runtime))
1864 )
1865
1866
1867def is_read_only_property(runtime: object) -> bool:

Callers 2

verify_funcitemFunction · 0.85
verify_overloadedfuncdefFunction · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…