Stabilize `UP042` (#22924)
Closes #22816. As I note on the issue, I was previously hesitant to
stabilize
this rule because of its long `## Fix safety` docs and the TODO comment
in the
source code. However, the behavior change in the docs is simply handled
by
making the fix unsafe, and resolving the TODO shouldn't require a
breaking
change. It will only allow the fix to be offered in more cases.
The docs and tests looked good.