Flake8 plugin to encourage correct string literal concatenation
Project Links
Meta
Author: Dylan Turner
Requires Python: >=3.10
Classifiers
Development Status
- 5 - Production/Stable
Environment
- Console
Framework
- Flake8
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3 :: Only
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
Topic
- Software Development :: Libraries :: Python Modules
- Software Development :: Quality Assurance
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 |
Release notes
You can find the release notes on the releases page.
Oct 06, 2025
0.6.0
Oct 20, 2024
0.5.0
Feb 07, 2023
0.4.0
Mar 21, 2022
0.3.0
Nov 25, 2020
0.2.0
Nov 28, 2019
0.1.0
Nov 26, 2019
0.0.0.post0