Files
openide/python/testData/stubs/FunctionStubDoesNotContainLocalVariableAnnotation.py
Mikhail Golubev ef615cb4a4 PY-24969 Don't keep PyAnnotationStubs for assignments and type declarations
Namely, retain them only for function return type annotations and
named parameters, since for these two PSI nodes we use
getStubOrPsiChild() in getAnnotation() as a way to quickly check
whether there is annotation at all. Otherwise, stubs for annotations
of local variables might be stored directly in a function stub and
thus falsely recognized as a type hint for its return value.
2017-08-31 14:29:35 +03:00

2 lines
27 B
Python