mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
In case of syntactic ambiguity with previous versions of the grammar, such as "with (expr)" or "with (expr1, expr2)", PyWithStatement is still parsed as having its own parentheses, not a parenthesized expression or a tuple as a single context expression. The latter case, even though syntactically legal, is still reported by the compatibility inspection in Python <3.9. These changes also include proper formatter and editing support (e.g. not inserting backslashes on line breaks inside parentheses), as well as Complete Current Statement, which now takes possible parentheses into account while inserting a missing colon. The changes in the formatter are somewhat ad-hoc, intended to minimize the effect on other constructs. "With" statement is somewhat special in the sense that it's the first compound statement (having a statement list) with its own list-like part in parentheses. Existing tests on with statement processing were expanded and uniformly named. Co-authored-by: Semyon Proshev <semyon.proshev@jetbrains.com> GitOrigin-RevId: 15c33e97f177e81b5ed23891063555df016feb05
118 B
118 B