mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
PY-20776 PY-20775 PY-20773 Do not highlight empty ranges inside f-strings
Such errors are difficult to spot because most of the time the
corresponding markers are displayed only in the right gutter, not in
the editor (though, sometimes a single character is highlighted for
some reason).
For an empty expression fragment the whole its content range is
highlighted (from "{" to either "!", ":" or "}").
For the first unclosed expression fragment the range from "{" to the
end of the containing string node is highlighted.
In case of a missing conversion character the character "!" itself is
highlighted.
This commit is contained in:
@@ -2,6 +2,6 @@ f'{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">
|
||||
f'{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{# foo}</error>}}'
|
||||
f'{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{z!z}</error>}}'
|
||||
f'{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{z:{42}}</error>}}'
|
||||
f'{<error descr="Empty expressions are not allowed inside f-strings"></error>:{<error descr="Empty expressions are not allowed inside f-strings"></error>:<error descr="Expression fragment inside f-string is nested too deeply">{:{}}</error>}}'
|
||||
f'{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{z<error descr="'}' is expected"></error></error>'
|
||||
<error descr="Missing closing quote [']">f'{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{z</error></error>
|
||||
f'<error descr="Empty expression fragments are not allowed inside f-strings">{:</error><error descr="Empty expression fragments are not allowed inside f-strings">{:</error><error descr="Expression fragment inside f-string is nested too deeply">{:{}}</error>}}'
|
||||
f'<error descr="'}' is expected">{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{z</error></error>'
|
||||
<error descr="Missing closing quote [']">f'<error descr="'}' is expected">{x:{y:<error descr="Expression fragment inside f-string is nested too deeply">{z</error></error></error>
|
||||
Reference in New Issue
Block a user