diff options
Diffstat (limited to 'mesonbuild/scripts/vcstagger.py')
| -rw-r--r-- | mesonbuild/scripts/vcstagger.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/scripts/vcstagger.py b/mesonbuild/scripts/vcstagger.py index 16dd4d1e5..64985f6d3 100644 --- a/mesonbuild/scripts/vcstagger.py +++ b/mesonbuild/scripts/vcstagger.py @@ -13,9 +13,9 @@ # limitations under the License. import sys, os, subprocess, re +import typing as T - -def config_vcs_tag(infile, outfile, fallback, source_dir, replace_string, regex_selector, cmd): +def config_vcs_tag(infile: str, outfile: str, fallback: str, source_dir: str, replace_string: str, regex_selector: str, cmd: T.List[str]) -> None: try: output = subprocess.check_output(cmd, cwd=source_dir) new_string = re.search(regex_selector, output.decode()).group(1).strip() @@ -34,7 +34,7 @@ def config_vcs_tag(infile, outfile, fallback, source_dir, replace_string, regex_ f.write(new_data) -def run(args): +def run(args: T.List[str]) -> int: infile, outfile, fallback, source_dir, replace_string, regex_selector = args[0:6] command = args[6:] config_vcs_tag(infile, outfile, fallback, source_dir, replace_string, regex_selector, command) |
