diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-09 10:31:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-09 10:31:52 -0700 |
| commit | 4c2d0eb9bcedefa3ef06a237a0502afbc581268b (patch) | |
| tree | 1b08ca5fb0c93573409a7a8954e6e1905f8a5b10 /mesonbuild/scripts/vcstagger.py | |
| parent | 8d54b7bda30062569c981b50a85a175565a7c15a (diff) | |
| parent | 057c77f7d08b3372e99065fb3f3cd37f16801a82 (diff) | |
| download | meson-4c2d0eb9bcedefa3ef06a237a0502afbc581268b.tar.gz | |
Merge pull request #7657 from mensinda/moreTyping
typing: Strict type annotations
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) |
