From 7bc644594ebb21c4ea46219845dfbe0e9b8efb23 Mon Sep 17 00:00:00 2001 From: Luke Friedrichs Date: Wed, 20 Nov 2024 13:06:51 +0100 Subject: [PATCH] fixed complement issue `assert A.get_object_complement_of().get_object_complement_of() == A` holds now --- owlapy/class_expression/class_expression.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/owlapy/class_expression/class_expression.py b/owlapy/class_expression/class_expression.py index 8e7bab6a..bfdd308c 100644 --- a/owlapy/class_expression/class_expression.py +++ b/owlapy/class_expression/class_expression.py @@ -63,6 +63,8 @@ def is_owl_thing(self) -> bool: def get_object_complement_of(self) -> 'OWLObjectComplementOf': # documented in parent + if isinstance(self, OWLObjectComplementOf): + return self.get_operand() return OWLObjectComplementOf(self) def get_nnf(self) -> 'OWLClassExpression':