fix(expr-ir): Ensure only __slots__, and not __dict__ too#3201
Merged
dangotbanned merged 10 commits intooh-nodesfrom Oct 13, 2025
Merged
fix(expr-ir): Ensure only __slots__, and not __dict__ too#3201dangotbanned merged 10 commits intooh-nodesfrom
__slots__, and not __dict__ too#3201dangotbanned merged 10 commits intooh-nodesfrom
Conversation
Bug discovered by @FBruzzesi #3194 (comment) Now I need to fix 200/222 failures 😂
mypy really doesn't like any variation of this
(https://docs.python.org/3/reference/datamodel.html#object.__slots__) > If a class defines a slot also defined in a base class, the instance variable defined by the base class slot is inaccessible (except by retrieving its descriptor directly from the base class). > This renders the meaning of the program undefined. > In the future, a check may be added to prevent this.
Mostly just moving repeat globals/builtins lookups into locals
9 tasks
Seems I was working around the issue before
dangotbanned
added a commit
that referenced
this pull request
Mar 14, 2026
Maaaaaaaaaaan, that had stumped me for 5 months! #3201
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Related issues
ExprIR #2572__slots__to allDTypes #3194Description
Bug discovered by @FBruzzesi see (#3194 (comment))
Now I need to fix 200/222 failures 😂FIXED: With some metaclass magic