summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-01-06 04:34:12 (GMT)
committerBen Gamari <ben@well-typed.com>2019-01-07 15:20:14 (GMT)
commit1c9dab22f010352884d6f7e5b62251bc4b0cca7c (patch)
tree0145b0665b69d8be0726f013ae9741c76cbc5c7a
parentc0448c18946e63bf47fc7da51c9bea2ee1b1740e (diff)
downloadghc-1c9dab22f010352884d6f7e5b62251bc4b0cca7c.zip
ghc-1c9dab22f010352884d6f7e5b62251bc4b0cca7c.tar.gz
ghc-1c9dab22f010352884d6f7e5b62251bc4b0cca7c.tar.bz2
fix-submodules: Rip out typing
Debian Jessie only runs Python 3.4, whereas typing was introduced in Python 3.5.
-rwxr-xr-x.gitlab/fix-submodules.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/.gitlab/fix-submodules.py b/.gitlab/fix-submodules.py
index 621d692..548e960 100755
--- a/.gitlab/fix-submodules.py
+++ b/.gitlab/fix-submodules.py
@@ -6,7 +6,6 @@ clone their submodules from its usual location. Otherwise users would need to
fork all submodules before their CI builds would succeed.
"""
-from typing import List, Dict
from pathlib import Path
import re
@@ -16,7 +15,7 @@ open('.gitmodules', 'w').write(x)
import subprocess
-def get_configs(config_file: Path) -> Dict[str, str]:
+def get_configs(config_file):
args = ['git', 'config', '-f', config_file.as_posix(), '--list']
out = subprocess.check_output(args)
configs = {}
@@ -27,7 +26,7 @@ def get_configs(config_file: Path) -> Dict[str, str]:
return configs
-def set_config(config_file: Path, key: str, value: str) -> None:
+def set_config(config_file, key, value):
args = ['git', 'config', '-f', config_file.as_posix(), '--replace', key, value]
subprocess.check_call(args)