INNER CODE UNIT · Python

start

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

                start = literals[run_start].start_byte - 1
                end = literals[run_end].end_byte - 1
                start = include_newly_trailing_whitespace(source, start, end)
            source = source[:start] + source[end:]

    return source.decode("utf-8"), deleted_lines


def find_annotations(
    file_path: Path, checker: str, alt_suppressions: list[str] | None = None
) -> list[Annotation]:
    """Return all Annotation objects in *file_path* containing *checker* or any alt."""
    all_suppressions = set([checker] + (alt_suppressions or []))
    source = file_path.read_bytes()
    lines = source.decode("utf-8").splitlines(keepends=True)

    annotations: list[Annotation] = []
    tree = _get_parser().parse(source)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…