flowrep.parsers.parser_helpers module

class flowrep.parsers.parser_helpers.SignatureInfo(names: 'list[str]', have_defaults: 'list[str]', have_restricted_kinds: 'dict[str, base_models.RestrictedParamKind]')[source]

Bases: object

have_defaults: list[str]
have_restricted_kinds: dict[str, RestrictedParamKind]
names: list[str]
classmethod of(func: LambdaType) SignatureInfo[source]
exception flowrep.parsers.parser_helpers.SourceCodeUnavailableError[source]

Bases: ValueError

flowrep.parsers.parser_helpers.consume_call_arguments(scope: SymbolScope, ast_call: Call, child: LabeledRecipe) None[source]

Record all argument->port consumptions for a node-creating call.

flowrep.parsers.parser_helpers.ensure_function(f: Any, decorator_name: str) None[source]
flowrep.parsers.parser_helpers.get_ast_function_node(func: LambdaType) FunctionDef[source]
flowrep.parsers.parser_helpers.get_available_source_code(func: LambdaType) str | None[source]
flowrep.parsers.parser_helpers.get_function_definition(tree: Module) FunctionDef[source]
flowrep.parsers.parser_helpers.get_source_code(func: LambdaType) str[source]
flowrep.parsers.parser_helpers.parser2decorator(func: LambdaType | str | None, output_labels: tuple[str, ...], *, parser: Callable[[...], Any], decorator_name: str, parser_kwargs: dict[str, Any] | None = None) LambdaType | Callable[[LambdaType], LambdaType][source]
flowrep.parsers.parser_helpers.resolve_symbols_to_strings(node: expr | None) list[str][source]