mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
If a per-project ".venv" is not excluded, we consider pythonX.Y/site-packages/typing_extensions.py a project source file, giving it priority over the bundled typing_extensions.pyi in Typeshed. In typing_extensions.py "Self" is defined as a function. Since we special-cased PyTypingTypeProvider.OPAQUE_NAMES only for assignments, we didn't recognize that it was a special form, and hence reported it as referring to an illegal type hint. Though it's more of an "incorrect project setup" type of problem, I think it's still worth supporting functions as "opaque names" just in case. (cherry picked from commit 63f641cd8667fbb31ba1fb167a24ca825a8baf8b) IJ-CR-176451 (cherry picked from commit 212368618d4d299048f0cee2ebaa1e35484eb86d) GitOrigin-RevId: f4458625552d751b8a75a500eb85b7f858f9a406