---
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
---
ISC003 [*] Explicitly concatenated string should be implicitly concatenated
  --> ISC.py:9:3
   |
 8 |   _ = (
 9 | /   "abc" +
10 | |   "def"
   | |_______^
11 |   )
   |
help: Remove redundant '+' operator to implicitly concatenate
   |
8  | _ = (
   -   "abc" +
9  +   "abc"
10 |   "def"
   |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
  --> ISC.py:14:3
   |
13 |   _ = (
14 | /   f"abc" +
15 | |   "def"
   | |_______^
16 |   )
   |
help: Remove redundant '+' operator to implicitly concatenate
   |
13 | _ = (
   -   f"abc" +
14 +   f"abc"
15 |   "def"
   |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
  --> ISC.py:19:3
   |
18 |   _ = (
19 | /   b"abc" +
20 | |   b"def"
   | |________^
21 |   )
   |
help: Remove redundant '+' operator to implicitly concatenate
   |
18 | _ = (
   -   b"abc" +
19 +   b"abc"
20 |   b"def"
   |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
  --> ISC.py:78:10
   |
77 |   # Explicitly concatenated nested f-strings
78 |   _ = f"a {f"first"
   |  __________^
79 | |     + f"second"} d"
   | |_______________^
80 |   _ = f"a {f"first {f"middle"}"
81 |       + f"second"} d"
   |
help: Remove redundant '+' operator to implicitly concatenate
   |
78 | _ = f"a {f"first"
   -     + f"second"} d"
79 +      f"second"} d"
80 | _ = f"a {f"first {f"middle"}"
   |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
  --> ISC.py:80:10
   |
78 |   _ = f"a {f"first"
79 |       + f"second"} d"
80 |   _ = f"a {f"first {f"middle"}"
   |  __________^
81 | |     + f"second"} d"
   | |_______________^
82 |
83 |   # See https://github.com/astral-sh/ruff/issues/12936
   |
help: Remove redundant '+' operator to implicitly concatenate
   |
80 | _ = f"a {f"first {f"middle"}"
   -     + f"second"} d"
81 +      f"second"} d"
82 |
   |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:110:5
    |
109 |   _ = (
110 | /     rf"raw_f{x}" +
111 | |     r"raw_normal"
    | |_________________^
112 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
109 | _ = (
    -     rf"raw_f{x}" +
110 +     rf"raw_f{x}"
111 |     r"raw_normal"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:117:5
    |
115 |   # Different prefix combinations
116 |   _ = (
117 | /     u"unicode" +
118 | |     r"raw"
    | |__________^
119 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
116 | _ = (
    -     u"unicode" +
117 +     u"unicode"
118 |     r"raw"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:122:5
    |
121 |   _ = (
122 | /     rb"raw_bytes" +
123 | |     b"normal_bytes"
    | |___________________^
124 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
121 | _ = (
    -     rb"raw_bytes" +
122 +     rb"raw_bytes"
123 |     b"normal_bytes"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:127:5
    |
126 |   _ = (
127 | /     b"bytes" +
128 | |     b"with_bytes"
    | |_________________^
129 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
126 | _ = (
    -     b"bytes" +
127 +     b"bytes"
128 |     b"with_bytes"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:133:6
    |
131 |   # Repeated concatenation
132 |
133 |   _ = ("a" +
    |  ______^
134 | |     "b" +
    | |_______^
135 |       "c" +
136 |       "d" + "e"
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
132 |
    - _ = ("a" +
133 + _ = ("a"
134 |     "b" +
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:139:6
    |
137 |   )
138 |
139 |   _ = ("a"
    |  ______^
140 | |     + "b"
    | |_________^
141 |       + "c"
142 |       + "d"
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
139 | _ = ("a"
    -     + "b"
140 +      "b"
141 |     + "c"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:160:5
    |
159 |   _ = (
160 | /     "first"
161 | |     +    "second"  # extra spaces around +
    | |_________________^
162 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
160 |     "first"
    -     +    "second"  # extra spaces around +
161 +         "second"  # extra spaces around +
162 | )
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:165:5
    |
164 |   _ = (
165 | /     "first"    +  # trailing spaces before +
166 | |     "second"
    | |____________^
167 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
164 | _ = (
    -     "first"    +  # trailing spaces before +
165 +     "first"  # trailing spaces before +
166 |     "second"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:170:5
    |
169 |   _ = ((
170 | /     "deep" +
171 | |     "nesting"
    | |_____________^
172 |   ))
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
169 | _ = ((
    -     "deep" +
170 +     "deep"
171 |     "nesting"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:175:5
    |
174 |   _ = (
175 | /     "contains + plus" +
176 | |     "another string"
    | |____________________^
177 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
174 | _ = (
    -     "contains + plus" +
175 +     "contains + plus"
176 |     "another string"
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:180:5
    |
179 |   _ = (
180 | /     "start"
181 | |         # leading comment
182 | |     + "end"
    | |___________^
183 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
181 | 		# leading comment
    -     + "end"
182 +      "end"
183 | )
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:186:5
    |
185 |   _ = (
186 | /     "start" +
187 | |         # leading comment
188 | |     "end"
    | |_________^
189 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
185 | _ = (
    -     "start" +
186 +     "start"
187 | 		# leading comment
    |

ISC003 [*] Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:201:5
    |
199 |   # ISC003
200 |   (
201 | /     t"The quick brown fox jumps over the lazy "
202 | |     + t"dog"
    | |____________^
203 |   )
    |
help: Remove redundant '+' operator to implicitly concatenate
    |
201 |     t"The quick brown fox jumps over the lazy "
    -     + t"dog"
202 +      t"dog"
203 | )
    |

ISC003 Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:216:5
    |
214 |   # reports diagnostic - no autofix.
215 |   # See https://github.com/astral-sh/ruff/issues/19757
216 |   _ = "abc" + (
    |  _____^
217 | |     "def"
218 | |     "ghi"
219 | | )
    | |_^
220 |
221 |   _ = (
    |
help: Remove redundant '+' operator to implicitly concatenate

ISC003 Explicitly concatenated string should be implicitly concatenated
   --> ISC.py:221:5
    |
219 |   )
220 |
221 |   _ = (
    |  _____^
222 | |     "abc"
223 | |     "def"
224 | | ) + "ghi"
    | |_________^
    |
help: Remove redundant '+' operator to implicitly concatenate
