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
+2 -2
View File
@@ -1,4 +1,4 @@
from typing import Dict
from __future__ import annotations
import pytest
@@ -13,5 +13,5 @@ def pytest_addoption(parser) -> None:
@pytest.fixture(
params=[{"CIBW_BUILD_FRONTEND": "pip"}, {"CIBW_BUILD_FRONTEND": "build"}], ids=["pip", "build"]
)
def build_frontend_env(request) -> Dict[str, str]:
def build_frontend_env(request) -> dict[str, str]:
return request.param # type: ignore[no-any-return]
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import textwrap
import pytest
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import textwrap
from . import test_projects, utils
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import subprocess
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import subprocess
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from . import test_projects, utils
before_test_project = test_projects.new_c_project()
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import textwrap
from . import test_projects, utils
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import platform
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import os
import jinja2
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import re
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import subprocess
import pytest
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import os
import subprocess
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import os
import subprocess
import sys
+3 -2
View File
@@ -1,6 +1,7 @@
from __future__ import annotations
import platform
import subprocess
from typing import Tuple
import pytest
@@ -14,7 +15,7 @@ ALL_MACOS_WHEELS = {
}
def get_xcode_version() -> Tuple[int, int]:
def get_xcode_version() -> tuple[int, int]:
output = subprocess.run(
["xcodebuild", "-version"],
text=True,
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import platform
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import textwrap
from . import test_projects, utils
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import pytest
from . import test_projects, utils
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from .base import TestProject
from .c import new_c_project
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import importlib
import subprocess
import sys
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, Union
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import jinja2
from .base import TestProject
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import subprocess
from test import test_projects
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import subprocess
from test import test_projects
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import textwrap
from . import test_projects, utils
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
from pathlib import Path
import jinja2
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import os
import subprocess
import textwrap
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import subprocess
import pytest
+2
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import pytest
from . import test_projects, utils
+2
View File
@@ -4,6 +4,8 @@ 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