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
@@ -3,6 +3,7 @@ from __future__ import annotations
import subprocess
import sys
import textwrap
from collections.abc import Set
from dataclasses import dataclass
from pathlib import Path, PurePath, PurePosixPath
from typing import Iterator, Tuple
@@ -46,7 +47,7 @@ class BuildStep:
def get_python_configurations(
build_selector: BuildSelector,
architectures: set[Architecture],
architectures: Set[Architecture],
) -> list[PythonConfiguration]:
full_python_configs = read_python_configs("linux")