Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maincheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"] # "3.10" must be in quotes to not have it eval to 3.1
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] # "3.10" must be in quotes to not have it eval to 3.1
steps:
- uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion music21/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'''
from __future__ import annotations

__version__ = '9.9.0'
__version__ = '9.9.1'

def get_version_tuple(vv):
v = vv.split('.')
Expand Down
2 changes: 1 addition & 1 deletion music21/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<class 'music21.base.Music21Object'>

>>> music21.VERSION_STR
'9.9.0'
'9.9.1'

Alternatively, after doing a complete import, these classes are available
under the module "base":
Expand Down
20 changes: 18 additions & 2 deletions music21/pitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,8 @@ def __lt__(self, other) -> bool:
>>> a < b
True
'''
if not isinstance(other, Pitch):
return NotImplemented
if self.ps < other.ps:
return True
else:
Expand Down Expand Up @@ -2133,7 +2135,12 @@ def __le__(self, other) -> bool:
Do not rely on this behavior -- it may be changed in a future version
to create a total ordering.
'''
return self.__lt__(other) or self.__eq__(other)
lt_result = self.__lt__(other)
if lt_result is NotImplemented:
return NotImplemented
if lt_result:
return True
return self.__eq__(other)

def __gt__(self, other) -> bool:
'''
Expand All @@ -2145,6 +2152,9 @@ def __gt__(self, other) -> bool:
>>> a > b
False
'''
if not isinstance(other, Pitch):
return NotImplemented

if self.ps > other.ps:
return True
else:
Expand Down Expand Up @@ -2177,7 +2187,13 @@ def __ge__(self, other) -> bool:
Do not rely on this behavior -- it may be changed in a future version
to create a total ordering.
'''
return self.__gt__(other) or self.__eq__(other)
gt_result = self.__gt__(other)
if gt_result is NotImplemented:
return NotImplemented
if gt_result:
return True

return self.__eq__(other)

# --------------------------------------------------------------------------
@property
Expand Down
5 changes: 5 additions & 0 deletions music21/tree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

This is a lower-level tool that for now at least normal music21
users won't need to worry about.

This directory will change significantly and may even be removed in v10.
Developers who depend on certain tree features (chirp...chirp...) should
speak up on the music21list or GitHub -- but in > 12 years of having it
no one has said they use it -- hence why it should be modified!
'''
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Artistic Software",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: Conversion",
Expand Down