chore: add structurally typed GenericPythonConfiguration (#1458)

* Add structually typed GenericPythonConfiguration

Use structural typing for the return value of get_python_configurations
so that we don't have to specify a union of all possible PythonConfiguration
types

* address henryiii's comments

* Use Set in more places
This commit is contained in:
Hood Chatham
2023-04-06 14:40:25 -04:00
committed by GitHub
parent bd5294b3f3
commit d018570bc4
5 changed files with 21 additions and 10 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import shutil
import subprocess
import sys
import textwrap
from collections.abc import Set
from dataclasses import dataclass
from functools import lru_cache
from pathlib import Path
@@ -71,7 +72,7 @@ class PythonConfiguration:
def get_python_configurations(
build_selector: BuildSelector,
architectures: set[Architecture],
architectures: Set[Architecture],
) -> list[PythonConfiguration]:
full_python_configs = read_python_configs("windows")