flake8-implicit-str-concat
This is a plugin for the Python code-checking tool Flake8 to encourage correct string literal concatenation.
It looks for style problems like implicitly concatenated string literals on the same line (which can be introduced by the code-formatting tool Black), or unnecessary plus operators for explicit string literal concatenation.
Install
pip install flake8-implicit-str-concat
Example
$ cat example.py
s = ('111111111111111111111'
'222222222222222222222')
$ black example.py
reformatted example.py
All done! ✨ 🍰 ✨
1 file reformatted.
$ cat example.py
s = "111111111111111111111" "222222222222222222222"
$ flake8 example.py
example.py:1:28: ISC001 implicitly concatenated string literals on one line
$ edit example.py # Remove the " " and save
$ cat example.py
s = "111111111111111111111222222222222222222222"
$ black example.py
All done! ✨ 🍰 ✨
1 file left unchanged.
$ flake8 example.py
$
Violation codes
The plugin uses the prefix ISC, short for Implicit String Concatenation.
| Code | Description |
|---|---|
| ISC001 | implicitly concatenated string literals on one line |
| ISC002 | implicitly concatenated string literals over continuation line |
| ISC003 | explicitly concatenated string should be implicitly concatenated |
| ISC004 | unparenthesized implicit string concatenation in collection |
ISC004
Checks for implicitly concatenated strings inside list, tuple, and set literals.
In collection literals, implicit string concatenation is often the result of a missing comma between elements, which can silently merge items together.
# Bad
facts = (
"Lobsters have blue blood.",
"The liver is the only human organ that can fully regenerate itself.",
"Clarinets are made almost entirely out of wood from the mpingo tree."
"In 1971, astronaut Alan Shepard played golf on the moon.",
)
# Good
facts = (
"Lobsters have blue blood.",
"The liver is the only human organ that can fully regenerate itself.",
"Clarinets are made almost entirely out of wood from the mpingo tree.",
"In 1971, astronaut Alan Shepard played golf on the moon.",
)
If the concatenation is intentional, wrap it in parentheses to make it explicit:
# Good
facts = (
"Lobsters have blue blood.",
"The liver is the only human organ that can fully regenerate itself.",
(
"Clarinets are made almost entirely out of wood from the mpingo tree."
"In 1971, astronaut Alan Shepard played golf on the moon."
),
)
Release notes
You can find the release notes on the releases page.
Release files for flake8-implicit-str-concat 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8_implicit_str_concat-0.7.0.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_implicit_str_concat-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / flake8_implicit_str_concat-0.7.0.tar.gz
| Download URL | flake8_implicit_str_concat-0.7.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
492d6d1097ec51ca9e712bef9c5b2e8345867dfa8c744a12bf4ef014fdb18561
|
|
BLAKE2b-256 checksum How to use checksums |
b083cb6050d37bd7bcf01dc81ac20d3db96ffc41aca7f73f81fbf61223d5aa03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logRelease files / flake8_implicit_str_concat-0.7.0-py3-none-any.whl
| Download URL | flake8_implicit_str_concat-0.7.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdabd6c6a314678364053b4a8682495692a43c22f229358e801f711999340d8b
|
|
BLAKE2b-256 checksum How to use checksums |
f83af4906c442afbfea281d7e03322c1761670dca950a4ef4abf1cab218fbc96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency log