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 in one line |
NIC002 | Implicitly concatenated string literals over multiple lines |
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 tools like Pipenv:
pipenv run python -m pip install -e .[dev]
pipenv run make 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.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b05d72a3c5334a2bd880537f6d56a8460ebf33c949ee6cc167a7d09b2b6b58 |
|
MD5 | ad3288eb441fa8c1df35c2e10fc21e52 |
|
BLAKE2b-256 | 74cd99a253165b527c33ff96819e2b079b4c7e81aa8d1346cf9b7a2b36a8d6ac |
Close
Hashes for flake8_no_implicit_concat-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7167b367047b948cb4f3fe886d2acbc29a1cc570b0796126b2de56273bb498b1 |
|
MD5 | 3a4dbecb70c0f7290b5f9dcc5c424ca7 |
|
BLAKE2b-256 | a0e725910d60e8a897a6fa2db34b0b1c11a6b7aa23027f0c3b47e9eca96c56bd |