Fix to_abc() crash on parts with drum tones — v0.41.1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 07:40:07 -04:00
parent 6ecef688e1
commit 4113aad5d0
5 changed files with 11 additions and 3 deletions
+4
View File
@@ -2,6 +2,10 @@
All notable changes to PyTheory are documented here.
## 0.41.1
- **Fix** — `to_abc()` no longer crashes on parts containing drum tones.
## 0.41.0
- **ABC notation export** — `Score.to_abc()` converts scores to ABC notation
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "pytheory"
version = "0.41.0"
version = "0.41.1"
description = "Music Theory for Humans"
readme = "README.md"
license = "MIT"
+1 -1
View File
@@ -1,6 +1,6 @@
"""PyTheory: Music Theory for Humans."""
__version__ = "0.41.0"
__version__ = "0.41.1"
from .tones import Tone, Interval
from .systems import System, SYSTEMS, TET
+4
View File
@@ -4442,6 +4442,10 @@ class Score:
if tone is None:
return "z"
# Skip drum tones — they don't have pitched names
if not hasattr(tone, "name") or not hasattr(tone, "octave"):
return "z"
name = tone.name # e.g. "C", "C#", "Bb"
octave = tone.octave if tone.octave is not None else 4
Generated
+1 -1
View File
@@ -690,7 +690,7 @@ wheels = [
[[package]]
name = "pytheory"
version = "0.41.0"
version = "0.41.1"
source = { editable = "." }
dependencies = [
{ name = "rich" },