PY-24729 Avoid unstubbing while accessing ahead of time annotations
Namely, don't use Scope to find an annotation if AST access is not allowed. Added tests on handling of top-level variable annotations and class attributes annotations in other files. Supposedly, we don't resolve to unqualified target expressions in other scopes when unstubbing is forbidden (ordinary local variables are not preserved in PSI stubs).
Showing
+66 -11
Please register or sign in to comment