Summary
See this playground link, where I've put the expected formatting going in, and you can see the unexpected formatting coming out:
https://play.ruff.rs/81f62f2d-6858-43eb-8a9b-67dcebdc56f6?secondary=Format
It appears that "grouping" characters in patterns like (), [], and {} aren't being used correctly when they are followed by a capture (as name). Instead of breaking on these, the entire pattern (including the capture) is wrapped in parentheses and indented.
First encountered in https://github.com/python/cpython/pull/133123/files#r2071981099.
Version
0.11.8