Use variable annotations instead of workarounds

This commit is contained in:
Yannick Jadoul
2020-05-06 23:55:54 +02:00
parent 5bdb21b705
commit 1a765ac431
6 changed files with 36 additions and 31 deletions
+4 -1
View File
@@ -28,7 +28,10 @@ def call(args: Union[str, List[str]], env: Optional[Dict[str, str]] = None, cwd:
return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)
PythonConfiguration = NamedTuple('PythonConfiguration', [('version', str), ('identifier', str), ('url', str)])
class PythonConfiguration(NamedTuple):
version: str
identifier: str
url: str
def get_python_configurations(build_selector: Callable[[str], bool]) -> List[PythonConfiguration]: