diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ee040297fb..1a533301b71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.12 + rev: v0.15.15 hooks: - id: ruff-check args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 26.3.1 + rev: 26.5.1 hooks: - id: black @@ -24,7 +24,7 @@ repos: exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.gd$|\.opt$) - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v22.1.4 + rev: v22.1.5 hooks: - id: clang-format types: [c] @@ -61,7 +61,7 @@ repos: - id: check-renovate - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.24.1 + rev: v1.25.2 hooks: - id: zizmor @@ -71,7 +71,7 @@ repos: - id: sphinx-lint - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.21.1 + rev: v2.23.0 hooks: - id: pyproject-fmt diff --git a/pyproject.toml b/pyproject.toml index 8861fe7755a..903c107fb87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,39 +91,38 @@ urls.Source = "https://github.com/python-pillow/Pillow" packages = [ "PIL", ] -include-package-data = true package-dir = { "" = "src" } +include-package-data = true dynamic.version = { attr = "PIL.__version__" } [tool.cibuildwheel] -before-all = ".github/workflows/wheels-dependencies.sh" build-verbosity = 1 config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable" +before-all = ".github/workflows/wheels-dependencies.sh" test-command = "cd {project} && .github/workflows/wheels-test.sh" -test-extras = "tests" test-requires = [ "numpy", ] -xbuild-tools = [] +test-extras = "tests" +# Disable platform guessing on macOS to avoid picking up Homebrew etc. +macos.config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable" +# Isolate macOS build environment from Homebrew etc. +macos.environment.PATH = "$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin" # Disable platform guessing on iOS, and disable raqm (since there won't be a # vendor version, and we can't distribute it due to licensing) ios.config-settings = "raqm=disable imagequant=disable platform-guessing=disable" # iOS needs to be given a specific pytest invocation and list of test sources. -ios.test-sources = [ - "checks", - "Tests", - "selftest.py", -] ios.test-command = [ "python -m selftest", "python -m pytest -vv -x -W always checks/check_wheel.py Tests", ] # There's no numpy wheel for iOS (yet...) ios.test-requires = [] -# Disable platform guessing on macOS to avoid picking up Homebrew etc. -macos.config-settings = "raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable" -# Isolate macOS build environment from Homebrew etc. -macos.environment.PATH = "$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin" +ios.test-sources = [ + "checks", + "Tests", + "selftest.py", +] overrides = [ # iOS environment is isolated by cibuildwheel, but needs the dependencies { select = "*_iphoneos", environment.PATH = "$(pwd)/build/deps/iphoneos/bin:$PATH" }, @@ -131,6 +130,7 @@ overrides = [ { select = "*_iphonesimulator", environment.PATH = "$(pwd)/build/deps/iphonesimulator/bin:$PATH" }, { select = "*-win32", test-requires = [] }, ] +xbuild-tools = [] [tool.black] exclude = "wheels/multibuild" @@ -187,16 +187,16 @@ lint.isort.required-imports = [ max_supported_python = "3.14" [tool.mypy] +follow_imports = "silent" python_version = "3.10" -pretty = true disallow_any_generics = true disallow_untyped_defs = true -enable_error_code = "ignore-without-code" -extra_checks = true -follow_imports = "silent" warn_redundant_casts = true -warn_unreachable = true warn_unused_ignores = true +warn_unreachable = true +enable_error_code = "ignore-without-code" +extra_checks = true +pretty = true [tool.pytest] addopts = [ "-ra", "--color=auto" ]