diff options
author | Jiri Suchan <yed@vanyli.net> | 2022-08-23 22:21:46 +0900 |
---|---|---|
committer | Jiri Suchan <yed@vanyli.net> | 2022-09-30 19:03:17 +0700 |
commit | c5bd2f9dce17f3e6bf7d9681243e2743633db6f0 (patch) | |
tree | 5cc835252cc999d086deaf05f3821ef3ce9e37e8 /editor/translations/extract.py | |
parent | f47979f0874b2ca6134e71575fbb359c6cc5ced0 (diff) | |
download | redot-engine-c5bd2f9dce17f3e6bf7d9681243e2743633db6f0.tar.gz |
ci: add Python static analysis check via mypy
Diffstat (limited to 'editor/translations/extract.py')
-rwxr-xr-x | editor/translations/extract.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/translations/extract.py b/editor/translations/extract.py index 07026baee2..cecdb3939d 100755 --- a/editor/translations/extract.py +++ b/editor/translations/extract.py @@ -8,6 +8,7 @@ import re import shutil import subprocess import sys +from typing import Dict, Tuple class Message: @@ -42,7 +43,7 @@ class Message: return "\n".join(lines) -messages_map = {} # (id, context) -> Message. +messages_map: Dict[Tuple[str, str], Message] = {} # (id, context) -> Message. line_nb = False @@ -51,11 +52,11 @@ for arg in sys.argv[1:]: print("Enabling line numbers in the context locations.") line_nb = True else: - os.sys.exit("Non supported argument '" + arg + "'. Aborting.") + sys.exit("Non supported argument '" + arg + "'. Aborting.") if not os.path.exists("editor"): - os.sys.exit("ERROR: This script should be started from the root of the git repo.") + sys.exit("ERROR: This script should be started from the root of the git repo.") matches = [] |