Skip to content

Commit

Permalink
Undo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TimFelixBeyer committed Apr 27, 2024
1 parent 1cb7ffa commit 4138f0a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions music21/scale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
'''
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4138f0a

Please sign in to comment.