From cf2ec0662b8ea423c252c71e4e926e7fc388d4da Mon Sep 17 00:00:00 2001
From: zy69guqi <richard.angersbach@fau.de>
Date: Thu, 16 Jan 2025 16:19:23 +0100
Subject: [PATCH] Fix inheritance of special math function enum classes

---
 src/pystencils/backend/functions.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/pystencils/backend/functions.py b/src/pystencils/backend/functions.py
index ea0d6cb9d..736345395 100644
--- a/src/pystencils/backend/functions.py
+++ b/src/pystencils/backend/functions.py
@@ -94,7 +94,7 @@ class MathFunctions(Enum):
         self.num_args = num_args
 
 
-class NumericLimitsFunctions(MathFunctions):
+class NumericLimitsFunctions(Enum):
     """Numerical limits functions supported by the backend.
 
     Each platform has to materialize these functions to a concrete implementation.
@@ -109,12 +109,12 @@ class PsMathFunction(PsFunction):
 
     __match_args__ = ("func",)
 
-    def __init__(self, func: MathFunctions) -> None:
+    def __init__(self, func: MathFunctions | NumericLimitsFunctions) -> None:
         super().__init__(func.function_name, func.num_args)
         self._func = func
 
     @property
-    def func(self) -> MathFunctions:
+    def func(self) -> MathFunctions | NumericLimitsFunctions:
         return self._func
 
     def __str__(self) -> str:
-- 
GitLab