Skip to content

fix(tools): lazy-import numpy in green_screen_composite#101

Open
johan-studioe wants to merge 1 commit into
calesthio:mainfrom
johan-studioe:fix/green-screen-numpy-lazy-import
Open

fix(tools): lazy-import numpy in green_screen_composite#101
johan-studioe wants to merge 1 commit into
calesthio:mainfrom
johan-studioe:fix/green-screen-numpy-lazy-import

Conversation

@johan-studioe

Copy link
Copy Markdown

The module-level import numpy as np made registry.discover() crash on
any machine without numpy installed — even though the tool already
declares numpy as an optional dependency (and every other numpy-using
tool in the repo lazy-imports it inside methods).

Move the import into _parse_hex_color and _composite_frame to match the
rest of the codebase. Type annotations stay valid via the existing
from __future__ import annotations.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

The module-level `import numpy as np` made registry.discover() crash on
any machine without numpy installed — even though the tool already
declares numpy as an optional dependency (and every other numpy-using
tool in the repo lazy-imports it inside methods).

Move the import into _parse_hex_color and _composite_frame to match the
rest of the codebase. Type annotations stay valid via the existing
`from __future__ import annotations`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@johan-studioe johan-studioe requested a review from calesthio as a code owner June 12, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant