Skip to content

Commit 84d4868

Browse files
committed
fix: add mypy override for PIL imports in integration tests
The CI was failing for Python 3.11 because mypy couldn't find type stubs for the PIL (Pillow) library, which is imported in the integration tests. Since PIL is only used optionally in integration tests (with a try/except fallback), we add a mypy override to ignore missing imports for PIL modules. This fixes the Python 3.11 CI failures while maintaining type safety for the rest of the codebase.
1 parent 048388f commit 84d4868

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ disallow_any_unimported = true
105105
module = "tests.*"
106106
disallow_untyped_defs = false
107107

108+
[[tool.mypy.overrides]]
109+
module = "PIL.*"
110+
ignore_missing_imports = true
111+
108112
# Pytest configuration moved to pytest.ini
109113

110114
[tool.coverage.run]

0 commit comments

Comments
 (0)