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
@@ -43,7 +43,10 @@ def matches_platform(identifier: str) -> bool:
return False
PythonConfiguration = NamedTuple('PythonConfiguration', [('version', str), ('identifier', str), ('path', str)])
class PythonConfiguration(NamedTuple):
version: str
identifier: str
path: str
def get_python_configurations(build_selector: Callable[[str], bool]) -> List[PythonConfiguration]: