Skip to content

TextRecord

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

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

TextRecord

Show source in text_record.py:12

Wrapper for a text-only ast.expr node.

Arguments

  • node - Related AST node.
  • text - Text to represent it.

Signature

class TextRecord(ExpressionRecord):
    def __init__(self, node: ast.AST, text: str) -> None:
        ...

See also

TextRecord().related_names

Show source in text_record.py:28

A list of fake ast.Name.id records inside the node.

Examples

TextRecord(ast_node, 'Union[str, MyClass]').related_names
{'Union', 'str', 'MyClass'}

Returns

A set of related names.

Signature

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