MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _pil

Function _pil

src/utils/image_processor.py:141–149  ·  view source on GitHub ↗

Lazy import for Pillow so module import stays cheap.

()

Source from the content-addressed store, hash-verified

139# ---------------------------------------------------------------------------
140
141def _pil():
142 """Lazy import for Pillow so module import stays cheap."""
143 try:
144 from PIL import Image, UnidentifiedImageError # noqa: F401
145 except ImportError as e: # pragma: no cover - dependency guaranteed by pyproject.toml
146 raise ImageProcessingError(
147 "Pillow is not installed. Add 'Pillow>=10.0' to dependencies."
148 ) from e
149 return Image, UnidentifiedImageError
150
151
152def _log_image_event(subtype: str, **fields: Any) -> None:

Callers 3

_resize_to_envelopeFunction · 0.85
maybe_resize_imageFunction · 0.85

Calls 1

Tested by

no test coverage detected