import shlex
trash_bin = "garbage".join(shlex.quote(a) for a in ["some", "quotable strings"])
If I run pyupgrade --py310-plus on this, I get trash_bin = shlex.join(["some", "quotable strings"]). But this is not equivalent. This is a very contrived case, but there are real cases I could envision, like ", ", where one might want to keep the str.join
Consider the following:
If I run
pyupgrade --py310-plus
on this, I gettrash_bin = shlex.join(["some", "quotable strings"])
. But this is not equivalent. This is a very contrived case, but there are real cases I could envision, like", "
, where one might want to keep thestr.join
pyupgrade==3.15.1