From 51c7b6233eacb8b52ed2fc65f817cac3a6cb51e5 Mon Sep 17 00:00:00 2001 From: Freya Gustavsson Date: Wed, 10 Jun 2026 13:30:03 +0200 Subject: [PATCH] python: Use deterministic import Adds explicit imports and `__all__` to `__init__.py` to explicitly mention the methods available to use upon importing the `pixelmatch` library. Signed-off-by: Freya Gustavsson --- pixelmatch/__init__.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pixelmatch/__init__.py b/pixelmatch/__init__.py index a3fc811..2020665 100644 --- a/pixelmatch/__init__.py +++ b/pixelmatch/__init__.py @@ -1,2 +1,16 @@ -from .core import * -from .utils import * +from .core import pixelmatch +from .utils import antialiased, has_many_siblings, color_delta, rgb2y, rgb2i, rgb2q, blendRGB, blend, draw_pixel, draw_gray_pixel + +__all__ = [ + "pixelmatch", + "antialiased", + "has_many_siblings", + "color_delta", + "rgb2y", + "rgb2i", + "rgb2q", + "blendRGB", + "blend", + "draw_pixel", + "draw_gray_pixel", +]