From e89c0e9e21aa6d3824118f3a02ef20bbdfdf8677 Mon Sep 17 00:00:00 2001 From: A_D Date: Thu, 10 Jun 2021 01:08:31 +0200 Subject: [PATCH] Fixed possibly unbound variable --- scripts/find_localised_strings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 60b1a03e..2bfc6b8b 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -71,6 +71,7 @@ def extract_comments(call: ast.Call, lines: list[str], file: pathlib.Path) -> Op above_line = lines[above].strip() if len(lines) >= above else None current_line = lines[current].strip() + line: Optional[str] = None bad_comment: Optional[str] = None for line in (above_line, current_line): if line is None or '#' not in line: