Skip to content

Duration.__eq__: only quarterLength matters when expression is inferred#1976

Merged
mscuthbert merged 2 commits into
masterfrom
expressionIsInferred-duration
Jul 6, 2026
Merged

Duration.__eq__: only quarterLength matters when expression is inferred#1976
mscuthbert merged 2 commits into
masterfrom
expressionIsInferred-duration

Conversation

@mscuthbert

Copy link
Copy Markdown
Member

Fixes #1970

When both Durations have expressionIsInferred=True, their type, dots, tuplets, and components can be freely re-expressed according to context, so only quarterLength needs to match for equality. Also corrects the expressionIsInferred docstring ("according to complex" -> "context").

AI-assisted (Claude)

Fixes #1970

When both Durations have expressionIsInferred=True, their type, dots,
tuplets, and components can be freely re-expressed according to context,
so only quarterLength needs to match for equality. Also corrects the
expressionIsInferred docstring ("according to complex" -> "context").

AI-assisted (Claude)
Use a more standard case (a plain eighth vs a dotted eighth under a 3:2
triplet, both 0.5 QL) and note that inferred expressions arise e.g. when
parsing from MIDI.

AI-assisted (Claude)
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 93.302% (+0.001%) from 93.301% — expressionIsInferred-duration into master

@mscuthbert mscuthbert merged commit f13c7cc into master Jul 6, 2026
7 checks passed
@mscuthbert mscuthbert deleted the expressionIsInferred-duration branch July 6, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duration: == under expressionIsInferred

2 participants