Skip to content

Binder: list child Kotlin packages/objects in a module's __dir__ and make them attribute-reachable #35

Closed

Description

@b-re-w

Reported by pythonx-compose (M2 #9). androidx.compose.ui.Alignment imports via the finder, but before that import androidx.compose.ui.Alignment as an attribute raises AttributeError and dir(androidx.compose.ui) does not list it. Completion lists and IDEs need it.

Decided: a binder module's __dir__ includes its direct child packages/objects (Kotlin names, from the packages the table knows), and attribute access to such a child imports it. Kotlin names only, so no conflict with the naming rule.

Completion: 'Alignment' in dir(androidx.compose.ui) and androidx.compose.ui.Alignment.End work without a prior import; tamper check.

Activity

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

    @b-re-w
    MemberAuthor

    Landed in develop via #51.

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