insndb/core: fix operands iterators paths
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 12 Jun 2023 07:11:44 +0000 (10:11 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Mon, 12 Jun 2023 07:12:12 +0000 (10:12 +0300)
src/openpower/insndb/core.py

index aef9530d7d746674dc3028daac2c0881f3c97c18..c8e4bc4d010ef5eb43905af390e119bae63b980a 100644 (file)
@@ -882,17 +882,13 @@ class Operands(Dict, datatype=object):
             (cls, kwargs) = items
             yield (cls, dict(kwargs))
 
-    @staticmethod
-    def filter(cls):
-        return lambda pair: issubclass(pair[0], cls)
-
     @cached_property
     def static(self):
-        return filter(self.__class__.filter(StaticOperand), self)
+        return tuple(filter(lambda pair: issubclass(pair[0], StaticOperand), self))
 
-    @property
+    @cached_property
     def dynamic(self):
-        return filter(self.__class__.filter(DynamicOperand), self)
+        return tuple(filter(lambda pair: issubclass(pair[0], DynamicOperand), self))
 
 
 class Arguments(tuple):