Skip to content

Commit

Permalink
removed more_itertools
Browse files Browse the repository at this point in the history
  • Loading branch information
alkidbaci committed Nov 28, 2024
1 parent 65a476c commit 50f31bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions owlapy/class_expression/nary_boolean_expression.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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):
Expand Down
5 changes: 2 additions & 3 deletions owlapy/owl_data_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 50f31bb

Please sign in to comment.