Skip to main content

Convert Implicit String Concat Inside Sequence into Individual Elements


ImportanceReview GuidanceRequires Scanning Tool
LowMerge After Cursory ReviewNo

This codemod fixes cases of implicit string concatenation inside lists, sets, or tuples. This is most likely a mistake: you probably meant include a comma in between the concatenated strings.

Our changes look something like this:

bad = [
- "ab"
+ "ab",
- "gh"
+ "gh",

If you have feedback on this codemod, please let us know!


Why is this codemod marked as Merge After Cursory Review?

While string concatenation inside a sequence iterable is likely a mistake, there are instances when you may choose to use them..

Codemod Settings