chore: use from __future__ import annotations

This commit is contained in:
mayeut
2022-07-19 07:47:45 +02:00
parent 054230e01b
commit 6d27f05c7c
71 changed files with 285 additions and 166 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import sys
from typing import Dict, List
if sys.version_info >= (3, 11):
import tomllib
@@ -27,7 +28,7 @@ def test_compare_configs():
def test_dump_with_Version():
# MyPy doesn't understand deeply nested dicts correctly
example: Dict[str, Dict[str, List[Dict[str, Printable]]]] = {
example: dict[str, dict[str, list[dict[str, Printable]]]] = {
"windows": {
"python_configurations": [
{"identifier": "cp27-win32", "version": Version("2.7.18"), "arch": "32"},
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from packaging.specifiers import SpecifierSet
from cibuildwheel.util import BuildSelector
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import sys
from pathlib import Path
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from cibuildwheel.util import DependencyConstraints
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import ssl
import certifi
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import os
from cibuildwheel.environment import parse_environment
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import textwrap
from pathlib import Path
from pprint import pprint
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import contextlib
import platform as platform_module
import subprocess
@@ -1,3 +1,5 @@
from __future__ import annotations
import sys
from fnmatch import fnmatch
from pathlib import Path
@@ -1,3 +1,5 @@
from __future__ import annotations
import sys
import pytest
@@ -1,3 +1,5 @@
from __future__ import annotations
import sys
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import os
import platform
import random
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import platform as platform_module
import subprocess
import sys
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import platform as platform_module
import pytest
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
import pytest
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from textwrap import dedent
from cibuildwheel.projectfiles import get_requires_python_str, setup_py_python_requires
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from cibuildwheel.options import CommandLineArguments
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import PurePath
import pytest
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import pytest
from cibuildwheel.util import print_new_wheels