Flake8 plugin that forbids implicit string literal concatenations.
# NG
a = "abc" "def"
b = ["aaa",
"bbb"
"ccc"]
# OK
a = "abcdef"
b = ["aaa",
"bbb" +
"ccc"]
Install via pip:
pip install flake8-no-implicit-concat
The plugin uses the prefix NIC
, short for No Implicit Concatenation.
Code | Description |
---|---|
NIC001 | Implicitly concatenated string literals |
- flake8-implicit-str-concat
Flake8 plugin to encourage correct string literal concatenation.
There are cases where this plugin prefers implicit concatenation over
explicit
+
operator , so these two plugins cannot be used in combination. - wemake-python-styleguide
Set of strict flake8 rules with some other plugins as dependencies.
It implements
WPS326 Found implicit string concatenation
, which also checks implicit string concatenations, as one of the many rules it has. - pylint This linter has
implicit-str-concat
rule. By default it only looks for occurrences of implicit concatenations on the same line, but you can give the--check-str-concat-over-line-jumps=y
option for concatenations over multiple lines.
Use Pipenv to run test locally:
pipenv install --dev
pipenv run check
This software is licensed under MIT license. See LICENSE
for details.
The code was derived from flake8-implicit-str-concat, which is developed by Dylan Turner and also licensed under MIT license.