Files
openide/python/testData/formatter/indentOfCommentsInsideMatchStatement.py
Mikhail Golubev 98d196aec6 PY-48009 Add automatic indent inside match statements
Namely, for their case clauses and inner comments.

Right now, each of them is indented on its own, as a separate formatting block.
It's still not entirely clear whether we should have a dedicated indented
container element for case clauses, similar to PyStatementList for statements.
It might simplify the formatter and some editing actions, but cause confusion
between the two container elements.

GitOrigin-RevId: 69184d2f8f78e2e113e8f40a310bb13ac0b5e71a
2021-05-24 10:28:35 +00:00

12 lines
186 B
Python

match x:
# first 1
# first 2
case 1:
pass
# intermediate 1
# intermediate 2
case 2:
pass
# trailing 1
# trailing 2
# unrelated