in tools/upgrade/errors.py [0:0]
def process_line(self, line: str, error_comments: List[str]) -> None:
comment_free_line = line.split("#")[0].rstrip()
if not self.is_active:
# Check if line break block is beginning.
self.is_active = comment_free_line.endswith("\\")
if self.is_active:
self.error_comments.append(error_comments)
return
# Check if line break block is ending.
self.error_comments.append(error_comments)
if comment_free_line.endswith("\\"):
return
if comment_free_line.endswith("("):
self.opened_expressions += 1
return
if comment_free_line.endswith(")"):
self.opened_expressions -= 1
self.is_active = self.opened_expressions > 0