From f8887c07d9927e920cd8f6aff5771b293777a948 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Sat, 31 May 2025 04:48:00 -0700 Subject: [PATCH 1/2] Raise exception of `blend_func` issue Signed-off-by: Emmanuel Ferdman --- arcade/gl/backends/opengl/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arcade/gl/backends/opengl/context.py b/arcade/gl/backends/opengl/context.py index 2a7753d253..30914cbdc7 100644 --- a/arcade/gl/backends/opengl/context.py +++ b/arcade/gl/backends/opengl/context.py @@ -143,7 +143,7 @@ def blend_func(self, value: Tuple[int, int] | Tuple[int, int, int, int]): elif len(value) == 4: gl.glBlendFuncSeparate(*value) else: - ValueError("blend_func takes a tuple of 2 or 4 values") + raise ValueError("blend_func takes a tuple of 2 or 4 values") @property def front_face(self) -> str: From 14f10c09f8daf19f03a7d54948427babb9aad97d Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Tue, 3 Jun 2025 00:30:51 +0200 Subject: [PATCH 2/2] Update arcade/gl/backends/opengl/context.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- arcade/gl/backends/opengl/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arcade/gl/backends/opengl/context.py b/arcade/gl/backends/opengl/context.py index 30914cbdc7..24f34e47a3 100644 --- a/arcade/gl/backends/opengl/context.py +++ b/arcade/gl/backends/opengl/context.py @@ -143,7 +143,7 @@ def blend_func(self, value: Tuple[int, int] | Tuple[int, int, int, int]): elif len(value) == 4: gl.glBlendFuncSeparate(*value) else: - raise ValueError("blend_func takes a tuple of 2 or 4 values") + raise ValueError(f"blend_func takes a tuple of 2 or 4 values, got {len(value)}") @property def front_face(self) -> str: