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 |
msullivan
left a comment
There was a problem hiding this comment.
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_iterationto 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.