Skip to content

Only accept type[Self] in the object.__class__ setter - #13021

Merged
srittau merged 1 commit into
python:mainfrom
jorenham:invariant-object.__class__
Nov 18, 2024
Merged

srittau merged 1 commit into
python:mainfrom
jorenham:invariant-object.__class__

Conversation

@jorenham

Copy link
Copy Markdown
Contributor

resolves #12997

@github-actions

Copy link
Copy Markdown
Contributor

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

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.

disallow A().__class__ = B

2 participants