From f749d816e45afd8467b74457a89b9bdbc78eed6f Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Wed, 28 Nov 2018 21:39:51 +0100 Subject: [PATCH] Pyolian: fixes for recent eolian changes --- src/scripts/pyolian/eolian.py | 10 +++------- src/scripts/pyolian/test_eolian.py | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 49d288d..0df4bc8 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -700,7 +700,7 @@ class Class(Object): def do_class_recursive(cls): if cls.parent: L.append(cls.parent) - for other in cls.inherits: + for other in cls.extensions: if other not in L: L.append(other) do_class_recursive(other) @@ -711,17 +711,13 @@ class Class(Object): @cached_property def hierarchy(self): L = [] - base = self.base_class + base = self.parent while base: L.append(base) - base = base.base_class + base = base.parent return L @cached_property - def base_class(self): - return self.parent - - @cached_property def ctor_enable(self): return bool(lib.eolian_class_ctor_enable_get(self)) diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index a1ab85b..23f172c 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -327,7 +327,6 @@ class TestEolianClass(unittest.TestCase): self.assertIsNone(cls.eo_prefix) # TODO fin a class with a value self.assertIsNone(cls.event_prefix) # TODO same as above self.assertIsNone(cls.data_type) # TODO same as above - self.assertEqual(cls.base_class.name, 'Efl.Loop_Consumer') self.assertEqual(cls.parent.name, 'Efl.Loop_Consumer') self.assertEqual([c.name for c in cls.extensions], []) self.assertEqual([c.name for c in cls.hierarchy], ['Efl.Loop_Consumer', 'Efl.Object']) -- 2.7.4