In #41160 , a new pyupgrade feature did some rewrites likes

-    s = "\n".join([_build_option_description(k) for k in keys])
+   s = "\n".join(_build_option_description(k) for k in keys)

However, they then reverted this feature as it was a potential performance regression (https://github.com/asottile/pyupgrade/issues/456).

I think we should revert those changes (though arguably not the entire PR) and add a rule to pandas-dev-flaker about using list comprehensions rather than generators when joining strings

If nobody takes this on earlier, I'll do this on Friday

Comment From: ghost

take

Comment From: MarcoGorelli

the PR for this was made to pandas-dev-flaker so we can close here