From 4138f0a43de215d6396befd437f468127d02263b Mon Sep 17 00:00:00 2001 From: Tim Beyer <35711942+TimFelixBeyer@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:42:30 +0200 Subject: [PATCH] Undo changes --- music21/scale/__init__.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/music21/scale/__init__.py b/music21/scale/__init__.py index 9005376d5..fb9c96370 100644 --- a/music21/scale/__init__.py +++ b/music21/scale/__init__.py @@ -1321,7 +1321,10 @@ def isConcrete(self): To be concrete, a Scale must have a defined tonic. An abstract Scale is not Concrete ''' - return self.tonic is not None + if self.tonic is None: + return False + else: + return True def __eq__(self, other): ''' @@ -1355,14 +1358,15 @@ def __eq__(self, other): if not self.isConcrete or not other.isConcrete: # if tonic is none, then we automatically do an abstract comparison return self._abstract == other._abstract - - if (isinstance(other, self.__class__) - and isinstance(self, other.__class__) - and self._abstract == other._abstract - and self.boundRange == other.boundRange - and self.tonic == other.tonic): - return True - return False + else: + if (isinstance(other, self.__class__) + and isinstance(self, other.__class__) + and self._abstract == other._abstract + and self.boundRange == other.boundRange + and self.tonic == other.tonic): + return True + else: + return False def __hash__(self): return id(self) >> 4