Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 28, 2022

There are two things that I've done:

  1. Now we clear attributes from dataclass that are shadowed by methods. It is helpful, so __call__ won't be considered a dataclass attribute, the same as runtime does
  2. assert -> if change to be safe and not fail. Why I want to be extra safe? Because we can shadow attrs with class, import, import from, @property possibly something else. I don't want to dive deep into supporting everything here, just not crashing is good enough

Feedback is welcome!

Closes #12084

This pull request was closed.
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.

mypy crashes on callable frozen dataclass

1 participant