black icon indicating copy to clipboard operation
black copied to clipboard

Fix formatting for `if` clauses in `match-case` blocks

Open rdrll opened this issue 11 months ago • 1 comments

Description

Fixes #3793.

Now the if clauses in the case-match blocks will be correctly wrapped with parenthesis.

The previous problem of having redundant parentheses being added to case statement when it's accompanied by an if clause that was too long, like the example mentioned in #3793 discussion, is also resolved.

Checklist - did you ...

  • [x] Add an entry in CHANGES.md if necessary?
  • [x] Add / update tests if necessary?
  • [ ] Add new / update outdated documentation?

rdrll avatar Mar 09 '24 01:03 rdrll

diff-shades reports zero changes comparing this PR (c87416a736441c015121595f2d7ef9a41dc6ab4d) to main (8332a75e82db143d33f1b873a572bb209675f8a7).


What is this? | Workflow run | diff-shades documentation

github-actions[bot] avatar Mar 09 '24 01:03 github-actions[bot]