Skip to content

Commit

Permalink
Format code with black (bot)
Browse files Browse the repository at this point in the history
  • Loading branch information
fosfrancesco committed Dec 19, 2024
1 parent f4930b5 commit 9b82412
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion partitura/io/exportmusicxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ def linearize_segment_contents(part, start, end, state):
voice_notes = notes_by_voice[voice]
# sort by pitch (then step in case of enharmonic notes)
voice_notes.sort(
key=lambda n: (n.midi_pitch, n.step) if hasattr(n, "midi_pitch") else (-1, ""),
key=lambda n: (
(n.midi_pitch, n.step) if hasattr(n, "midi_pitch") else (-1, "")
),
reverse=True,
)
# grace notes should precede other notes at the same onset
Expand Down

0 comments on commit 9b82412

Please sign in to comment.