Skip to content

Make self and cls positional-only in dict constructor methods - #15262

Merged
srittau merged 1 commit into
mainfrom
alex/dict-pos-only
Jan 11, 2026
Merged

srittau merged 1 commit into
mainfrom
alex/dict-pos-only

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Jan 11, 2026 •

Copy link
Copy Markdown
Member

Fixes astral-sh/ty#2449. This means that ty will not complain for dict(self=42) or dict(cls=56), both of which work at runtime.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit a4eeb5c into main Jan 11, 2026
@srittau
srittau deleted the alex/dict-pos-only branch January 11, 2026 18:21
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.

False positives for cls/self in dict creation

2 participants