TypePlaceholder
A placeholder for a Type node that does not exist. Can be populated using the edit
method.
Inherits from
Methods
edit
Edits the type annotation of a placeholder node.
Modifies the source code by adding or updating a type annotation after a node. Handles cases where the parent node has children and adjusts spacing accordingly.
Args: new_src (str): The new type annotation text to be inserted. fix_indentation (bool, optional): Whether to fix the indentation of the new source. Defaults to False. priority (int, optional): Priority of the edit operation. Defaults to 0. dedupe (bool, optional): Whether to remove duplicate edits. Defaults to True.
Returns: None
remove
Remove this element from its parent.
Remove this element by removing it from its parent container.
Args: *args: Variable length argument list. Unused. **kwargs: Arbitrary keyword arguments. Unused.
Returns: None