Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cibuildwheel/_compat/tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import tarfile

TYPE_CHECKING = False

if TYPE_CHECKING:
from pathlib import Path

Expand Down
3 changes: 2 additions & 1 deletion cibuildwheel/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
import time
from collections.abc import Generator
from pathlib import Path
from typing import IO, TYPE_CHECKING, AnyStr, Final, Literal
from typing import IO, AnyStr, Final, Literal

import humanize

from cibuildwheel.ci import CIProvider, detect_ci_provider, filter_ansi_codes

TYPE_CHECKING = False
if TYPE_CHECKING:
from cibuildwheel.options import Options

Expand Down
3 changes: 2 additions & 1 deletion cibuildwheel/platforms/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from collections import OrderedDict
from collections.abc import Iterable, Iterator, Sequence, Set
from pathlib import Path, PurePath, PurePosixPath
from typing import TYPE_CHECKING, assert_never
from typing import assert_never

from cibuildwheel import errors
from cibuildwheel.architecture import Architecture
Expand All @@ -22,6 +22,7 @@
from cibuildwheel.util.helpers import prepare_command, unwrap
from cibuildwheel.util.packaging import find_compatible_wheel

TYPE_CHECKING = False
if TYPE_CHECKING:
from cibuildwheel.typing import PathOrStr

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ flake8-annotations.mypy-init-return = true
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
"typing.Set".msg = "Use collections.abc.Set instead."
"typing.TYPE_CHECKING".msg = "Use TYPE_CHECKING=False instead"

[tool.ruff.lint.per-file-ignores]
"unit_test/*" = ["PLC1901", "TID252"]
Expand Down
3 changes: 2 additions & 1 deletion unit_test/get_platform_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
from collections.abc import Generator
from pathlib import Path
from typing import TYPE_CHECKING

import pytest
import setuptools._distutils.util
Expand All @@ -11,6 +10,8 @@
from cibuildwheel.errors import FatalError
from cibuildwheel.platforms.windows import PythonConfiguration, setup_setuptools_cross_compile

TYPE_CHECKING = False

# monkeypatching os.name is too flaky. E.g. It works on my machine, but fails in pipeline
if not sys.platform.startswith("win") and not TYPE_CHECKING:
pytest.skip("Windows-only tests", allow_module_level=True)
Expand Down
2 changes: 1 addition & 1 deletion unit_test/main_tests/main_options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from collections.abc import Mapping
from fnmatch import fnmatch
from pathlib import Path
from typing import TYPE_CHECKING

import pytest

Expand All @@ -15,6 +14,7 @@
from cibuildwheel.util import resources
from cibuildwheel.util.packaging import DependencyConstraints

TYPE_CHECKING = False
if TYPE_CHECKING:
from .conftest import ArgsInterceptor

Expand Down
Loading