Flake8 plugin that forbids implicit string literal concatenations
Project description
flake8-no-implicit-concat
Flake8 plugin that forbids implicit string literal concatenations.
# NG
a = "abc" "def"
b = ["aaa",
"bbb"
"ccc"]
# OK
a = "abcdef"
b = ["aaa",
"bbb" +
"ccc"]
Installation
Install via pip:
pip install flake8-no-implicit-concat
Violation code
The plugin uses the prefix NIC
, short for No Implicit Concatenation.
Code | Description |
---|---|
NIC001 | Implicitly concatenated string literals |
Other Plugins & Linters
- 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.
Development
Use Pipenv to run test locally:
pipenv install --dev
pipenv run check
License
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flake8-no-implicit-concat-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 736f927117997541c392eaf916a363d74152e514326b9a0ef5fa234604411cfd |
|
MD5 | 31920863dded1196a4a6ef99bbff26b7 |
|
BLAKE2b-256 | bc2c7f90cb48f7caafa6365f93486c01e68a7fc0f0728dfd6b296eee78831736 |
Close
Hashes for flake8_no_implicit_concat-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f39394ab2c6df8c6d7e1079a26356de5bb275e57659ead4f1976b4618deb9bd |
|
MD5 | 290b92c197e1cb8e9f488770801bf3bb |
|
BLAKE2b-256 | 0362da084895aee8ce568cbbf9806e1363e203523102bbe13d5dd6fc2407d1de |