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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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]
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
36 changes: 18 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,46 +91,46 @@ 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" },
# iOS simulator environment is isolated by cibuildwheel, but needs the dependencies
{ select = "*_iphonesimulator", environment.PATH = "$(pwd)/build/deps/iphonesimulator/bin:$PATH" },
{ select = "*-win32", test-requires = [] },
]
xbuild-tools = []

[tool.black]
exclude = "wheels/multibuild"
Expand Down Expand Up @@ -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" ]
Expand Down
Loading