Skip to content

Not all types and nodes have __slots__ #11195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Sep 26, 2021 · 0 comments · Fixed by #11197
Closed

Not all types and nodes have __slots__ #11195

sobolevn opened this issue Sep 26, 2021 · 0 comments · Fixed by #11197
Labels
bug mypy got something wrong

Comments

@sobolevn
Copy link
Member

For some reason not all classes in

have explicit __slots__.

I will send a PR with the fix.

@sobolevn sobolevn added the bug mypy got something wrong label Sep 26, 2021
JukkaL pushed a commit that referenced this issue Oct 1, 2021
Quick review of changes:

* I had to move all class-level values into self. definitions, because class attributes and 
  incompatible with __slots__. This seems like a good idea for me, because there was no 
  reason for them to be class-level. I can even imagine several bugs based on over-use of 
  class-level attributes mutation. It might take more memory in some cases though.
* I've added several TODO items to op: str, it seems like Enum would be a better fit there

Closes #11195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant