INNER CODE UNIT · Python
Annotation
uber/NullAway · scripts/nullaway-suppression-remover/src/suppression_remover/core.py:55
class Annotation:
"""A @SuppressWarnings annotation found in a Java source file."""
start_line: int # 1-indexed, inclusive
end_line: int # 1-indexed, inclusive
original_lines: list # list[str] — exact source lines (with newlines)
checkers: list # list[str] — checker names in original order
needed: bool = field(default=False)
# ---------------------------------------------------------------------------
# Project root detection
# ---------------------------------------------------------------------------
def find_project_root(start: Path | None = None) -> Path:
"""Walk up from *start* (default: cwd) looking for a Gradle or Maven root."""
path = (start or Path.cwd()).resolve()