chore: stricter mypy (#2053)
* chore: improve mypy Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * chore(types): type functions in tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * chore(types): No partial types in tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -4,12 +4,14 @@ import textwrap
|
||||
from pathlib import Path
|
||||
from pprint import pprint
|
||||
|
||||
import pytest
|
||||
|
||||
import cibuildwheel.linux
|
||||
from cibuildwheel.oci_container import OCIContainerEngineConfig
|
||||
from cibuildwheel.options import CommandLineArguments, Options
|
||||
|
||||
|
||||
def test_linux_container_split(tmp_path: Path, monkeypatch):
|
||||
def test_linux_container_split(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
"""
|
||||
Tests splitting linux builds by container image, container engine, and before_all
|
||||
"""
|
||||
@@ -53,13 +55,13 @@ def test_linux_container_split(tmp_path: Path, monkeypatch):
|
||||
build_steps = list(cibuildwheel.linux.get_build_steps(options, python_configurations))
|
||||
|
||||
# helper functions to extract test info
|
||||
def identifiers(step):
|
||||
def identifiers(step: cibuildwheel.linux.BuildStep) -> list[str]:
|
||||
return [c.identifier for c in step.platform_configs]
|
||||
|
||||
def before_alls(step):
|
||||
def before_alls(step: cibuildwheel.linux.BuildStep) -> list[str]:
|
||||
return [options.build_options(c.identifier).before_all for c in step.platform_configs]
|
||||
|
||||
def container_engines(step):
|
||||
def container_engines(step: cibuildwheel.linux.BuildStep) -> list[OCIContainerEngineConfig]:
|
||||
return [options.build_options(c.identifier).container_engine for c in step.platform_configs]
|
||||
|
||||
pprint(build_steps)
|
||||
|
||||
Reference in New Issue
Block a user