STYLE: replace unwanted-patterns-strings-to-concatenate with ruff
- [x] closes #51406

`Unwanted-patterns-strings-to-concatenate` replaced with ruff.
I resolved the merge conflict and updated my branch. Thank you @natmokval!