chore: use if TYPE_CHECKING: blocks (#2866)

This commit is contained in:
Matthieu Darbois
2026-05-27 18:20:08 -04:00
committed by GitHub
parent 2380f52783
commit e3e7cc9e07
79 changed files with 566 additions and 168 deletions
+6 -1
View File
@@ -4,11 +4,12 @@ Utility functions used by the cibuildwheel tests.
This file is added to the PYTHONPATH in the test runner at bin/run_test.py.
"""
from __future__ import annotations
import os
import platform as pm
import subprocess
import sys
from collections.abc import Generator, Mapping, Sequence
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Final
@@ -20,6 +21,10 @@ from cibuildwheel.ci import CIProvider, detect_ci_provider
from cibuildwheel.selector import EnableGroup
from cibuildwheel.util.file import CIBW_CACHE_PATH
TYPE_CHECKING = False
if TYPE_CHECKING:
from collections.abc import Generator, Mapping, Sequence
EMULATED_ARCHS: Final[list[str]] = sorted(
arch.value for arch in (Architecture.all_archs("linux") - Architecture.auto_archs("linux"))
)