---
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
---
ISC.py:1:5: ISC001 [*] Implicitly concatenated string literals on one line
  |
1 | _ = "a" "b" "c"
  |     ^^^^^^^ ISC001
2 | 
3 | _ = "abc" + "def"
  |
  = help: Combine string literals

ℹ Safe fix
1   |-_ = "a" "b" "c"
  1 |+_ = "ab" "c"
2 2 | 
3 3 | _ = "abc" + "def"
4 4 | 

ISC.py:1:9: ISC001 [*] Implicitly concatenated string literals on one line
  |
1 | _ = "a" "b" "c"
  |         ^^^^^^^ ISC001
2 | 
3 | _ = "abc" + "def"
  |
  = help: Combine string literals

ℹ Safe fix
1   |-_ = "a" "b" "c"
  1 |+_ = "a" "bc"
2 2 | 
3 3 | _ = "abc" + "def"
4 4 | 

ISC.py:38:5: ISC001 [*] Implicitly concatenated string literals on one line
   |
36 | )
37 | 
38 | _ = """a""" """b"""
   |     ^^^^^^^^^^^^^^^ ISC001
39 | 
40 | _ = """a
   |
   = help: Combine string literals

ℹ Safe fix
35 35 |   b"def"
36 36 | )
37 37 | 
38    |-_ = """a""" """b"""
   38 |+_ = """ab"""
39 39 | 
40 40 | _ = """a
41 41 | b""" """c

ISC.py:40:5: ISC001 [*] Implicitly concatenated string literals on one line
   |
38 |   _ = """a""" """b"""
39 |   
40 |   _ = """a
   |  _____^
41 | | b""" """c
42 | | d"""
   | |____^ ISC001
43 |   
44 |   _ = f"""a""" f"""b"""
   |
   = help: Combine string literals

ℹ Safe fix
38 38 | _ = """a""" """b"""
39 39 | 
40 40 | _ = """a
41    |-b""" """c
   41 |+bc
42 42 | d"""
43 43 | 
44 44 | _ = f"""a""" f"""b"""

ISC.py:44:5: ISC001 [*] Implicitly concatenated string literals on one line
   |
42 | d"""
43 | 
44 | _ = f"""a""" f"""b"""
   |     ^^^^^^^^^^^^^^^^^ ISC001
45 | 
46 | _ = f"a" "b"
   |
   = help: Combine string literals

ℹ Safe fix
41 41 | b""" """c
42 42 | d"""
43 43 | 
44    |-_ = f"""a""" f"""b"""
   44 |+_ = f"""ab"""
45 45 | 
46 46 | _ = f"a" "b"
47 47 | 

ISC.py:46:5: ISC001 Implicitly concatenated string literals on one line
   |
44 | _ = f"""a""" f"""b"""
45 | 
46 | _ = f"a" "b"
   |     ^^^^^^^^ ISC001
47 | 
48 | _ = """a""" "b"
   |
   = help: Combine string literals

ISC.py:48:5: ISC001 Implicitly concatenated string literals on one line
   |
46 | _ = f"a" "b"
47 | 
48 | _ = """a""" "b"
   |     ^^^^^^^^^^^ ISC001
49 | 
50 | _ = 'a' "b"
   |
   = help: Combine string literals

ISC.py:50:5: ISC001 Implicitly concatenated string literals on one line
   |
48 | _ = """a""" "b"
49 | 
50 | _ = 'a' "b"
   |     ^^^^^^^ ISC001
51 | 
52 | _ = rf"a" rf"b"
   |
   = help: Combine string literals

ISC.py:52:5: ISC001 [*] Implicitly concatenated string literals on one line
   |
50 | _ = 'a' "b"
51 | 
52 | _ = rf"a" rf"b"
   |     ^^^^^^^^^^^ ISC001
53 | 
54 | # Single-line explicit concatenation should be ignored.
   |
   = help: Combine string literals

ℹ Safe fix
49 49 | 
50 50 | _ = 'a' "b"
51 51 | 
52    |-_ = rf"a" rf"b"
   52 |+_ = rf"ab"
53 53 | 
54 54 | # Single-line explicit concatenation should be ignored.
55 55 | _ = "abc" + "def" + "ghi"

ISC.py:64:10: ISC001 [*] Implicitly concatenated string literals on one line
   |
63 | # Multiple strings nested inside a f-string
64 | _ = f"a {'b' 'c' 'd'} e"
   |          ^^^^^^^ ISC001
65 | _ = f"""abc {"def" "ghi"} jkl"""
66 | _ = f"""abc {
   |
   = help: Combine string literals

ℹ Safe fix
61 61 | _ = foo + "abc" + bar
62 62 | 
63 63 | # Multiple strings nested inside a f-string
64    |-_ = f"a {'b' 'c' 'd'} e"
   64 |+_ = f"a {'bc' 'd'} e"
65 65 | _ = f"""abc {"def" "ghi"} jkl"""
66 66 | _ = f"""abc {
67 67 |     "def"

ISC.py:64:14: ISC001 [*] Implicitly concatenated string literals on one line
   |
63 | # Multiple strings nested inside a f-string
64 | _ = f"a {'b' 'c' 'd'} e"
   |              ^^^^^^^ ISC001
65 | _ = f"""abc {"def" "ghi"} jkl"""
66 | _ = f"""abc {
   |
   = help: Combine string literals

ℹ Safe fix
61 61 | _ = foo + "abc" + bar
62 62 | 
63 63 | # Multiple strings nested inside a f-string
64    |-_ = f"a {'b' 'c' 'd'} e"
   64 |+_ = f"a {'b' 'cd'} e"
65 65 | _ = f"""abc {"def" "ghi"} jkl"""
66 66 | _ = f"""abc {
67 67 |     "def"

ISC.py:65:14: ISC001 [*] Implicitly concatenated string literals on one line
   |
63 | # Multiple strings nested inside a f-string
64 | _ = f"a {'b' 'c' 'd'} e"
65 | _ = f"""abc {"def" "ghi"} jkl"""
   |              ^^^^^^^^^^^ ISC001
66 | _ = f"""abc {
67 |     "def"
   |
   = help: Combine string literals

ℹ Safe fix
62 62 | 
63 63 | # Multiple strings nested inside a f-string
64 64 | _ = f"a {'b' 'c' 'd'} e"
65    |-_ = f"""abc {"def" "ghi"} jkl"""
   65 |+_ = f"""abc {"defghi"} jkl"""
66 66 | _ = f"""abc {
67 67 |     "def"
68 68 |     "ghi"

ISC.py:72:5: ISC001 Implicitly concatenated string literals on one line
   |
71 | # Nested f-strings
72 | _ = "a" f"b {f"c" f"d"} e" "f"
   |     ^^^^^^^^^^^^^^^^^^^^^^ ISC001
73 | _ = f"b {f"c" f"d {f"e" f"f"} g"} h"
74 | _ = f"b {f"abc" \
   |
   = help: Combine string literals

ISC.py:72:9: ISC001 Implicitly concatenated string literals on one line
   |
71 | # Nested f-strings
72 | _ = "a" f"b {f"c" f"d"} e" "f"
   |         ^^^^^^^^^^^^^^^^^^^^^^ ISC001
73 | _ = f"b {f"c" f"d {f"e" f"f"} g"} h"
74 | _ = f"b {f"abc" \
   |
   = help: Combine string literals

ISC.py:72:14: ISC001 [*] Implicitly concatenated string literals on one line
   |
71 | # Nested f-strings
72 | _ = "a" f"b {f"c" f"d"} e" "f"
   |              ^^^^^^^^^ ISC001
73 | _ = f"b {f"c" f"d {f"e" f"f"} g"} h"
74 | _ = f"b {f"abc" \
   |
   = help: Combine string literals

ℹ Safe fix
69 69 | } jkl"""
70 70 | 
71 71 | # Nested f-strings
72    |-_ = "a" f"b {f"c" f"d"} e" "f"
   72 |+_ = "a" f"b {f"cd"} e" "f"
73 73 | _ = f"b {f"c" f"d {f"e" f"f"} g"} h"
74 74 | _ = f"b {f"abc" \
75 75 |     f"def"} g"

ISC.py:73:10: ISC001 [*] Implicitly concatenated string literals on one line
   |
71 | # Nested f-strings
72 | _ = "a" f"b {f"c" f"d"} e" "f"
73 | _ = f"b {f"c" f"d {f"e" f"f"} g"} h"
   |          ^^^^^^^^^^^^^^^^^^^^^^^ ISC001
74 | _ = f"b {f"abc" \
75 |     f"def"} g"
   |
   = help: Combine string literals

ℹ Safe fix
70 70 | 
71 71 | # Nested f-strings
72 72 | _ = "a" f"b {f"c" f"d"} e" "f"
73    |-_ = f"b {f"c" f"d {f"e" f"f"} g"} h"
   73 |+_ = f"b {f"cd {f"e" f"f"} g"} h"
74 74 | _ = f"b {f"abc" \
75 75 |     f"def"} g"
76 76 | 

ISC.py:73:20: ISC001 [*] Implicitly concatenated string literals on one line
   |
71 | # Nested f-strings
72 | _ = "a" f"b {f"c" f"d"} e" "f"
73 | _ = f"b {f"c" f"d {f"e" f"f"} g"} h"
   |                    ^^^^^^^^^ ISC001
74 | _ = f"b {f"abc" \
75 |     f"def"} g"
   |
   = help: Combine string literals

ℹ Safe fix
70 70 | 
71 71 | # Nested f-strings
72 72 | _ = "a" f"b {f"c" f"d"} e" "f"
73    |-_ = f"b {f"c" f"d {f"e" f"f"} g"} h"
   73 |+_ = f"b {f"c" f"d {f"ef"} g"} h"
74 74 | _ = f"b {f"abc" \
75 75 |     f"def"} g"
76 76 | 


