From 50f31bb45f53cf1a1426411a0b77357473ca1d4d Mon Sep 17 00:00:00 2001 From: Alkid Date: Thu, 28 Nov 2024 13:43:18 +0100 Subject: [PATCH] removed more_itertools --- owlapy/class_expression/nary_boolean_expression.py | 5 ++--- owlapy/owl_data_ranges.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/owlapy/class_expression/nary_boolean_expression.py b/owlapy/class_expression/nary_boolean_expression.py index f23d6ac..4435b2d 100644 --- a/owlapy/class_expression/nary_boolean_expression.py +++ b/owlapy/class_expression/nary_boolean_expression.py @@ -1,6 +1,4 @@ """OWL nary boolean expressions""" -from more_itertools import ilen - from .class_expression import OWLClassExpression, OWLBooleanClassExpression from ..meta_classes import HasOperands from typing import Final, Sequence, Iterable @@ -31,7 +29,8 @@ def __repr__(self): def __eq__(self, other): if type(other) is type(self): - return set(self._operands) == set(other.operands()) and ilen(self._operands) == ilen(other.operands()) + return (set(self._operands) == set(other.operands()) + and len(list(self._operands)) == len(list(other.operands()))) return False def __hash__(self): diff --git a/owlapy/owl_data_ranges.py b/owlapy/owl_data_ranges.py index 6afacd5..290bc79 100644 --- a/owlapy/owl_data_ranges.py +++ b/owlapy/owl_data_ranges.py @@ -4,8 +4,6 @@ DataRange := Datatype | DataIntersectionOf | DataUnionOf | DataComplementOf | DataOneOf | DatatypeRestriction """ -from more_itertools import ilen - from .owl_object import OWLObject from .meta_classes import HasOperands from typing import Final, Sequence, Iterable @@ -43,7 +41,8 @@ def __repr__(self): def __eq__(self, other): if type(other) is type(self): - return set(self._operands) == set(other._operands) and ilen(self._operands) == ilen(other._operands) + return (set(self._operands) == set(other._operands) + and len(list((self._operands))) == len(list((other._operands)))) return False def __hash__(self):