Skip to content

Stubs: a class lists only one of its Kotlin supertypes (Arrangement.HorizontalOrVertical) #71

Closed

Description

@b-re-w

In the Compose stubs (develop fa2558e, run 37098191598) Arrangement.HorizontalOrVertical is rendered class HorizontalOrVertical(Horizontal), but in Kotlin it implements both Arrangement.Horizontal and Arrangement.Vertical. mypy then rejects Column(verticalArrangement=Arrangement.SpaceBetween) (a Vertical slot), and pythonx-compose has to annotate SpaceBetween, Center, spacedBy's return etc. as Any.

Completion: a stub renders every Kotlin supertype that has a stub class as a base (class HorizontalOrVertical(Horizontal, Vertical)), in an MRO-valid order; a plugin stub test pins it; tools/stubs/consumer.py gains Column(verticalArrangement=Arrangement.SpaceBetween, content=...) and Row(horizontalArrangement=Arrangement.SpaceBetween, ...) checked by check-stubs.sh (red on today's stubs).

Activity

  1. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions