You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.pys = ('111111111111111111111' '222222222222222222222')
$ black example.pyreformatted example.pyAll done! ✨ 🍰 ✨1 file reformatted.
$ cat example.pys = "111111111111111111111" "222222222222222222222"
$ flake8 example.pyexample.py:1:28: ISC001 implicitly concatenated string literals on one line
$ edit example.py # Remove the " " and save
$ cat example.pys = "111111111111111111111222222222222222222222"
$ black example.pyAll 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.
About
Flake8 plugin to encourage correct string literal concatenation