diff options
author | akhropov <akhropov@yandex-team.com> | 2024-03-28 17:28:36 +0300 |
---|---|---|
committer | akhropov <akhropov@yandex-team.com> | 2024-03-28 17:40:20 +0300 |
commit | 3ef7b38056eaa1deece0f74575691b23f01ecc05 (patch) | |
tree | b852cc14bb7edcfe276bd626f8d754211b8ee660 | |
parent | 73c78e63703013863db96d6dc42db94dcb6cbb16 (diff) | |
download | ydb-3ef7b38056eaa1deece0f74575691b23f01ecc05.tar.gz |
Compatibility with Python < 3.9 (https://docs.python.org/3.9/whatsnew/3.9.html#type-hinting-generics-in-standard-collections)..
a7fa2700711581dad0944aa9a7441af03275ec23
-rw-r--r-- | build/export_generators/hardcoded-cmake/build/scripts/re_replace.py | 3 | ||||
-rw-r--r-- | build/scripts/re_replace.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/build/export_generators/hardcoded-cmake/build/scripts/re_replace.py b/build/export_generators/hardcoded-cmake/build/scripts/re_replace.py index 02937103bc..b21c744df7 100644 --- a/build/export_generators/hardcoded-cmake/build/scripts/re_replace.py +++ b/build/export_generators/hardcoded-cmake/build/scripts/re_replace.py @@ -1,4 +1,5 @@ import sys +from typing import List import argparse import re @@ -9,7 +10,7 @@ def patch_line(line: str, from_re: re.Pattern, to_re: str) -> str: return re.sub(from_re, to_re, line) -def main(args: list[str]): +def main(args: List[str]): argparser = argparse.ArgumentParser(allow_abbrev=False) argparser.add_argument('--from-re', required=True) argparser.add_argument('--to-re', required=True) diff --git a/build/scripts/re_replace.py b/build/scripts/re_replace.py index 02937103bc..b21c744df7 100644 --- a/build/scripts/re_replace.py +++ b/build/scripts/re_replace.py @@ -1,4 +1,5 @@ import sys +from typing import List import argparse import re @@ -9,7 +10,7 @@ def patch_line(line: str, from_re: re.Pattern, to_re: str) -> str: return re.sub(from_re, to_re, line) -def main(args: list[str]): +def main(args: List[str]): argparser = argparse.ArgumentParser(allow_abbrev=False) argparser.add_argument('--from-re', required=True) argparser.add_argument('--to-re', required=True) |