INNER CODE UNIT · Python

collect

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

    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:
    """Rewrite one suppression annotation while preserving surrounding text exactly."""
    source = annotation_line.encode("utf-8")
    tree = _get_parser().parse(source)
    for node in find_suppress_warnings_nodes(tree.root_node):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…