Skip to content

Do not append to the caller's list in AbstractOctaveRepeatingScale (AI Assisted) - #2038

Merged
mscuthbert merged 2 commits into
cuthbertLab:masterfrom
float3:octave-repeating-scale-keeps-callers-list
Sep 29, 2026
Merged

mscuthbert merged 2 commits into
cuthbertLab:masterfrom
float3:octave-repeating-scale-keeps-callers-list

Conversation

@float3

@float3 float3 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

buildNetwork completed the octave with mode.append(iComplement),

mode = ['M3', 'M3']
scale.OctaveRepeatingScale('c4', mode)
mode  # ['M3', 'M3', <music21.interval.Interval d4>]

Reusing that list for a second scale then built a different scale.

buildNetwork completed the octave with mode.append(iComplement), so the
list passed in came back longer:

    mode = ['M3', 'M3']
    scale.OctaveRepeatingScale('c4', mode)
    mode  # ['M3', 'M3', <music21.interval.Interval d4>]

Reusing that list for a second scale then built a different scale.
Build a new list instead.
@coveralls

coveralls commented Sep 21, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 93.35%. remained the same — float3:octave-repeating-scale-keeps-callers-list into cuthbertLab:master

@float3

float3 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

I saw that agents.md mentions changing the copyright years, which I didn't do for previous PRs

@mscuthbert

Copy link
Copy Markdown
Member

I saw that agents.md mentions changing the copyright years, which I didn't do for previous PRs

no worries -- it's not a big deal. :-)

@mscuthbert

Copy link
Copy Markdown
Member

this is fine -- we might tighten the typing of mode to something like list[interval.Interval] and rename it from mode. But a lot of these Abstract scales probably need to be rethought anyhow...

@mscuthbert mscuthbert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mscuthbert
mscuthbert merged commit b70871b into cuthbertLab:master Sep 29, 2026
7 checks passed
@mscuthbert

Copy link
Copy Markdown
Member

sorry -- approved and then forgot to merge!

@float3
float3 deleted the octave-repeating-scale-keeps-callers-list branch September 30, 2026 05:41
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.

3 participants