Skip to content

Fix: Stub paths are case-unique; Python-keyword Kotlin names left out - #49

Merged
b-re-w merged 2 commits into
developfrom
work/stub-case
Oct 3, 2026
Merged

b-re-w merged 2 commits into
developfrom
work/stub-case

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 3, 2026

Copy link
Copy Markdown
Member

Closes #44

  • Case-unique layout (StubCaseLayoutTest, red before: Shadow/ and shadow/ both emitted).
  • Python-keyword names (Shadow.None) left out with a getattr() comment (StubKeywordNameTest, red 2/2 before, observed).
  • stubs.yml gains a stubs-macos job.

Coordinator verification: plugin tests 171/0; Compose 1.11.1 stubs regenerated: 0 casefold collisions; tools/stubs/check-stubs.sh on macOS: Success, no import ignore; artifact fixtures 35/0.

b-re-w added 2 commits October 3, 2026 09:00
…words are left out

A class module whose path collides case-insensitively with a sibling (Compose's
graphics.Shadow vs the graphics.shadow package) is emitted as a class inside
its parent's __init__.pyi; non-colliding class modules keep their own path.
macOS and Windows can now extract and type-check the stub set.

That exposed a second defect: Shadow.None was written as 'None: Shadow', a
syntax error that made mypy skip the whole module. A Kotlin name that is a
Python keyword cannot be an attribute or def in Python at all; the stub now
leaves it out with a comment naming getattr(). A stubs-macos CI job checks
both.
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.

1 participant