Files
openide/python/testData/resolve/FStringComprehensionSourcePart.py
Mikhail Golubev 7ca673715e PY-21479 Properly resolve references in f-strings inside comprehensions
Namely, choose the correct anchor PSI element for CFG-sensitive local
resolve process: not the whole statement that contains the comprehension
but rather the closest ancestor result part of the comprehension because
if the referenced symbol is defined inside the comprehension, the
corresponding vertex will be below the statement in the graph not above
it.
2016-12-27 14:04:47 +03:00

3 lines
63 B
Python

foo = 42
xs = [x for x in f'{foo}']
<ref>