Closed
Description
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 (asottile/pyupgrade#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