Skip to content

FunctionRecord

Handsdown API Index / Handsdown / AST Parser / Node Records / FunctionRecord

Auto-generated documentation for handsdown.ast_parser.node_records.function_record module.

FunctionRecord

Show source in function_record.py:16

Wrapper for an ast.FunctionDef and ast.AsyncFunctionDef node.

Arguments

  • node - AST node.

Signature

class FunctionRecord(NodeRecord):
    def __init__(self, node: ASTFunctionDef, is_method: bool) -> None:
        ...

See also

FunctionRecord().is_init

Show source in function_record.py:140

Returns True if function is an init method.

Signature

def is_init(self) -> bool:
    ...

FunctionRecord().parse_type_comments

Show source in function_record.py:97

Extract comment type annotations from a function definiition lines.

Sets arguments_record to a new TextRecord for each found type annotaiton. Also sets return_type_hint to a TextRecord if function return type found.

Signature

def parse_type_comments(self, lines: Iterable[str]) -> None:
    ...

FunctionRecord().related_names

Show source in function_record.py:40

Set of related names.

Signature

@property
def related_names(self) -> Set[str]:
    ...