Inherits from

Placeholder

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

def edit(self, new_src: str, fix_indentation: bool = False, priority: int = 0, dedupe: bool = True) -> 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

def remove(self, *args, **kwargs) -> None:
    ...

Was this page helpful?