-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix forward references and generic inheritance in attrs classes #12772
Conversation
This is similar to #12762, but for attrs classes.
This comment has been minimized.
This comment has been minimized.
The new errors from home-assistant look a bit suspicious. Maybe unsupported converters now generate too many errors. |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
return True | ||
|
||
for super_info in ctx.cls.info.mro[1:-1]: | ||
if 'attrs_tag' in super_info.metadata and 'attrs' not in super_info.metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe at some point we should switch to using constants (e.g. to avoid typos).
Move the attrs plugin to a later pass, so that we won't have placeholders. Fix
various issues related to forward references and generic inheritance, including
some crashes.
This is follow-up to #12762 and related to #12656 and #12633.