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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
exclude: "^tests"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.2
rev: v0.12.7
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down Expand Up @@ -59,7 +59,7 @@ repos:
exclude: "^tests|src/scikit_build_core/resources/scikit-build.schema.json|^docs/projects.md"

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.1
rev: v1.17.1
hooks:
- id: mypy
exclude: |
Expand Down Expand Up @@ -131,7 +131,7 @@ repos:
additional_dependencies: ["cogapp>=3.5"]

- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: 2025.06.23
rev: 2025.07.28
hooks:
- id: validate-pyproject

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ exclude = [
'^tests/packages/extensionlib/*',
]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src", "$MYPY_CONFIG_FILE_DIR/tests/utils"]
python_version = "3.8"
python_version = "3.9"
warn_unused_configs = true
warn_unreachable = false
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
Expand Down
4 changes: 2 additions & 2 deletions src/scikit_build_core/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
import sysconfig
from pathlib import Path
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any

from .. import __version__
from .._compat.importlib import metadata, resources
Expand Down Expand Up @@ -85,7 +85,7 @@ def _filter_env_cmake_args(env_cmake_args: list[str]) -> Generator[str, None, No
yield arg


def _sanitize_path(path: os.PathLike[str]) -> list[Path]:
def _sanitize_path(path: Any) -> list[Path]:
# This handles classes like:
# MultiplexedPath from importlib.resources.readers (3.11+)
# MultiplexedPath from importlib.readers (3.10)
Expand Down
16 changes: 12 additions & 4 deletions tests/test_editable.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from __future__ import annotations

import platform
import sys
import textwrap
from pathlib import Path

import pytest
from conftest import PackageInfo, process_package
from conftest import PackageInfo, VEnv, process_package


@pytest.mark.compile
Expand Down Expand Up @@ -160,8 +162,12 @@ def test_install_dir(isolated):


def _setup_package_for_editable_layout_tests(
monkeypatch, tmp_path, editable, editable_mode, isolated
):
monkeypatch: pytest.MonkeyPatch,
tmp_path: Path,
editable: bool,
editable_mode: str,
isolated: VEnv,
) -> None:
editable_flag = ["-e"] if editable else []

config_mode_flags = []
Expand All @@ -177,6 +183,8 @@ def _setup_package_for_editable_layout_tests(
package = PackageInfo("importlib_editable")
process_package(package, tmp_path, m)

assert isolated.wheelhouse

ninja = [
"ninja"
for f in isolated.wheelhouse.iterdir()
Expand Down Expand Up @@ -211,7 +219,7 @@ def test_direct_import(monkeypatch, tmp_path, editable, editable_mode, isolated)
if platform.system() == "Windows" and editable_mode == "inplace":
pytest.xfail("Windows fails to import the top-level extension module")

_setup_package_for_editable_layout_tests( # type: ignore[no-untyped-call]
_setup_package_for_editable_layout_tests(
monkeypatch, tmp_path, editable, editable_mode, isolated
)
isolated.execute("import pkg")
Expand Down
Loading