Skip to content

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

Open
float3 wants to merge 2 commits into
cuthbertLab:masterfrom
float3:octave-repeating-scale-keeps-callers-list
Open

float3 wants to merge 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!

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