1+ from __future__ import annotations
2+
13import argparse
24import os
35import shutil
79import textwrap
810from pathlib import Path
911from tempfile import mkdtemp
10- from typing import List , Set , Union
1112
1213import cibuildwheel
1314import cibuildwheel .linux
@@ -257,7 +258,7 @@ def build_in_directory(args: CommandLineArguments) -> None:
257258 log .warning (f"Can't delete temporary folder '{ str (tmp_path )} '" )
258259
259260
260- def print_preamble (platform : str , options : Options , identifiers : List [str ]) -> None :
261+ def print_preamble (platform : str , options : Options , identifiers : list [str ]) -> None :
261262 print (
262263 textwrap .dedent (
263264 """
@@ -287,13 +288,13 @@ def print_preamble(platform: str, options: Options, identifiers: List[str]) -> N
287288
288289
289290def get_build_identifiers (
290- platform : PlatformName , build_selector : BuildSelector , architectures : Set [Architecture ]
291- ) -> List [str ]:
292- python_configurations : Union [
293- List [cibuildwheel .linux .PythonConfiguration ],
294- List [cibuildwheel .windows .PythonConfiguration ],
295- List [cibuildwheel .macos .PythonConfiguration ],
296- ]
291+ platform : PlatformName , build_selector : BuildSelector , architectures : set [Architecture ]
292+ ) -> list [str ]:
293+ python_configurations : (
294+ list [cibuildwheel .linux .PythonConfiguration ]
295+ | list [cibuildwheel .windows .PythonConfiguration ]
296+ | list [cibuildwheel .macos .PythonConfiguration ]
297+ )
297298
298299 if platform == "linux" :
299300 python_configurations = cibuildwheel .linux .get_python_configurations (
@@ -313,7 +314,7 @@ def get_build_identifiers(
313314 return [config .identifier for config in python_configurations ]
314315
315316
316- def detect_warnings (* , options : Options , identifiers : List [str ]) -> List [str ]:
317+ def detect_warnings (* , options : Options , identifiers : list [str ]) -> list [str ]:
317318 warnings = []
318319
319320 # warn about deprecated {python} and {pip}
0 commit comments