INNER CODE UNIT · Python
source
uber/NullAway · scripts/nullaway-suppression-remover/src/suppression_remover/core.py:261
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
literals = _string_literal_nodes(annotation)
is_target = [
bool(
literal.text
and literal.text.decode()[1:-1] in suppression_names
)
for literal in literals
]
try:
run_start = is_target.index(True)