MCPcopy
hub / github.com/faust-streaming/faust / Function

Function Function

faust/utils/codegen.py:26–49  ·  view source on GitHub ↗

Compile function code object from args and body.

(
    name: str,
    args: List[str],
    body: List[str],
    *,
    globals: Dict[str, Any] = None,
    locals: Dict[str, Any] = None,
    return_type: Any = MISSING,
    argsep: str = ", ",
)

Source from the content-addressed store, hash-verified

24
25
26def Function(
27 name: str,
28 args: List[str],
29 body: List[str],
30 *,
31 globals: Dict[str, Any] = None,
32 locals: Dict[str, Any] = None,
33 return_type: Any = MISSING,
34 argsep: str = ", ",
35) -> Callable:
36 """Compile function code object from args and body."""
37 return build_function(
38 name=name,
39 source=build_function_source(
40 name=name,
41 args=args,
42 body=body,
43 return_type=return_type,
44 argsep=argsep,
45 ),
46 return_type=return_type,
47 globals=globals,
48 locals=locals,
49 )
50
51
52def build_closure_source(

Callers 1

MethodFunction · 0.85

Calls 2

build_functionFunction · 0.85
build_function_sourceFunction · 0.85

Tested by

no test coverage detected