INNER CODE UNIT · Python

_string_literal_nodes

uber/NullAway · scripts/nullaway-suppression-remover/src/suppression_remover/core.py:177

def _string_literal_nodes(node: ts.Node) -> list[ts.Node]:
    """Return the string-literal descendants of *node* in source order."""
    results: list[ts.Node] = []

    def collect(current: ts.Node) -> None:
        if current.type == "string_literal":
            results.append(current)
            return
        for child in current.children:
            collect(child)

    collect(node)
    return results


def _rewrite_single_line_annotation(
    annotation_line: str, new_value: str, suppression_names: set[str]
) -> str:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…