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

Function get_module_func_defs

mypyc/irbuild/prepare.py:198–207  ·  view source on GitHub ↗

Collect all of the (non-method) functions declared in a module.

(module: MypyFile)

Source from the content-addressed store, hash-verified

196
197
198def get_module_func_defs(module: MypyFile) -> Iterable[FuncDef]:
199 """Collect all of the (non-method) functions declared in a module."""
200 for node in module.names.values():
201 # We need to filter out functions that are imported or
202 # aliases. The best way to do this seems to be by
203 # checking that the fullname matches.
204 if isinstance(node.node, (FuncDef, Decorator, OverloadedFuncDef)) and is_from_module(
205 node.node, module
206 ):
207 yield get_func_def(node.node)
208
209
210def prepare_func_def(

Callers 2

build_type_mapFunction · 0.85
load_type_mapFunction · 0.85

Calls 4

get_func_defFunction · 0.90
isinstanceFunction · 0.85
is_from_moduleFunction · 0.85
valuesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…