INNER CODE UNIT · Python
line_end
uber/NullAway · scripts/nullaway-suppression-remover/src/suppression_remover/core.py:251
line_end = len(source) if newline == -1 else newline + 1
without_literal = (
source[line_start : literal.start_byte]
+ source[literal.end_byte : line_end]
)
if re.fullmatch(rb"[ \t]*,?[ \t]*(?:\r?\n)?", without_literal):
line_deletions.add((line_start, line_end))
for start, end in sorted(line_deletions, reverse=True):
deleted_lines.add(source.count(b"\n", 0, start) + 1)
source = source[:start] + source[end:]
# Handle values that share a line. Work one contiguous target run at a time and
# reparse after each edit so byte offsets remain accurate.
while True:
annotation = target_annotation(source)
if annotation is None:
break