Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up context initializers. #1522

Merged
merged 1 commit into from
Feb 26, 2023

Conversation

trevorbaca
Copy link
Member

Forces keyword parameters to be keyword-only.

OLD:

abjad.Score(
    components=None,
    lilypond_type: str = "Score",
    simultaneous: bool = True,
    name: str | None = None,
    tag: _tag.Tag | None = None,
    *,
    language: str = "english",
)

abjad.Staff(
    components=None,
    lilypond_type: str = "Staff",
    simultaneous: bool = False,
    name: str | None = None,
    tag: _tag.Tag | None = None,
    *,
    language: str = "english",
)

abjad.StaffGroup(
    components=None,
    lilypond_type: str = "StaffGroup",
    simultaneous: bool = True,
    name: str | None = None,
    tag: _tag.Tag | None = None,
    *,
    language: str = "english",
)

abjad.Voice(
    components=None,
    lilypond_type: str = "Voice",
    simultaneous: bool = False,
    name: str | None = None,
    tag: _tag.Tag | None = None,
    *,
    language: str = "english",
)

NEW:

abjad.Score(
    components=None,
    *,
    language: str = "english",
    lilypond_type: str = "Score",
    name: str | None = None,
    simultaneous: bool = True,
    tag: _tag.Tag | None = None,
)

abjad.Staff(
    components=None,
    *,
    language: str = "english",
    lilypond_type: str = "Staff",
    name: str | None = None,
    simultaneous: bool = False,
    tag: _tag.Tag | None = None,
)

abjad.StaffGroup(
    components=None,
    *,
    language: str = "english",
    lilypond_type: str = "StaffGroup",
    name: str | None = None,
    simultaneous: bool = True,
    tag: _tag.Tag | None = None,
)

abjad.Voice(
    components=None,
    *,
    language: str = "english",
    lilypond_type: str = "Voice",
    name: str | None = None,
    simultaneous: bool = False,
    tag: _tag.Tag | None = None,
)

OLD:

    abjad.Score(
        components=None,
        lilypond_type: str = "Score",
        simultaneous: bool = True,
        name: str | None = None,
        tag: _tag.Tag | None = None,
        *,
        language: str = "english",
    )

    abjad.Staff(
        components=None,
        lilypond_type: str = "Staff",
        simultaneous: bool = False,
        name: str | None = None,
        tag: _tag.Tag | None = None,
        *,
        language: str = "english",
    )

    abjad.StaffGroup(
        components=None,
        lilypond_type: str = "StaffGroup",
        simultaneous: bool = True,
        name: str | None = None,
        tag: _tag.Tag | None = None,
        *,
        language: str = "english",
    )

    abjad.Voice(
        components=None,
        lilypond_type: str = "Voice",
        simultaneous: bool = False,
        name: str | None = None,
        tag: _tag.Tag | None = None,
        *,
        language: str = "english",
    )

NEW:

    abjad.Score(
        components=None,
        *,
        language: str = "english",
        lilypond_type: str = "Score",
        name: str | None = None,
        simultaneous: bool = True,
        tag: _tag.Tag | None = None,
    )

    abjad.Staff(
        components=None,
        *,
        language: str = "english",
        lilypond_type: str = "Staff",
        name: str | None = None,
        simultaneous: bool = False,
        tag: _tag.Tag | None = None,
    )

    abjad.StaffGroup(
        components=None,
        *,
        language: str = "english",
        lilypond_type: str = "StaffGroup",
        name: str | None = None,
        simultaneous: bool = True,
        tag: _tag.Tag | None = None,
    )

    abjad.Voice(
        components=None,
        *,
        language: str = "english",
        lilypond_type: str = "Voice",
        name: str | None = None,
        simultaneous: bool = False,
        tag: _tag.Tag | None = None,
    )
@trevorbaca trevorbaca added this to the 3.17 milestone Feb 26, 2023
@trevorbaca trevorbaca self-assigned this Feb 26, 2023
@trevorbaca trevorbaca merged commit a2fd399 into main Feb 26, 2023
@trevorbaca trevorbaca deleted the trevor/clean-up-context-initializers branch February 26, 2023 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant