-
-
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
New semantic analyzer: Fix --disallow-untyped-defs with attrs plugin and forward references #6724
Conversation
Actually, it looks like the guard against final iteration is not necessary, I am going to remove it for now. |
Oh, it is actually needed, I just run the tests without |
The test failures are actually hard to fix. They highlight a problem with all plugins that use |
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.
This is solid for a bugfix but I think we need to consider if there is a cleaner way to allow plugins to handle these issues. Explicitly checking for the new analyzer and explicitly checking final_iteration are pretty nitty-gritty details that we don't want to have to inflict everywhere.
Yes. One of this will go after the new one is the default. For the second one, possible option is to have |
@msullivan Opened #6725 |
The fix essentially mirrors the one for dataclasses. Note I temporary add
final_iteration
to the old analyzer, because plugin files import everything from the old one.The non-trivial part is removing previously generated functions in plugins to make them re-entrant.