Flake8 plugin that forbids implicit str/bytes literal concatenations
Project description
flake8-no-implicit-concat
Flake8 plugin that forbids implicit str/bytes literal concatenations.
# Not Allowed
print('foo' 'bar', 'baz')
a = ["aaa",
"bbb"
"ccc"]
b = b'abc' b'def'
# OK
print('foobar', 'baz')
a = ["aaa",
"bbb"
+ "ccc"]
b = b'abcdef'
Installation
Install via pip:
pip install flake8-no-implicit-concat
Violation Codes
The plugin uses the prefix NIC, short for No Implicit Concatenation.
| Code | Description |
|---|---|
| NIC001 | Implicitly concatenated str literals on one line |
| NIC002 | Implicitly concatenated str literals over multiple lines |
| NIC101 | Implicitly concatenated bytes literals on one line |
| NIC102 | Implicitly concatenated bytes literals over multiple lines |
Other Plugins & Linters
- flake8-implicit-str-concat
Flake8 plugin to encourage correct string literal concatenation.
This plugin is different from
flake8-no-implicit-concatbecause this plugin prefers implicit concatenations over explicit+operators when concatenating literals over multiple lines. - wemake-python-styleguide
Set of strict flake8 rules with several plugins as dependencies.
It implements
WPS326 Found implicit string concatenation, which also checks implicit string concatenations, as one of the many rules it defines. - pylint
This linter has
implicit-str-concatrule. By default it only looks for occurrences of implicit concatenations on the same line, but it has--check-str-concat-over-line-jumps=yoption to enable checking of 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 released under MIT license. See LICENSE for details.
The code was derived from flake8-implicit-str-concat, which is developed by Dylan Turner and also released 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8_no_implicit_concat-0.3.7.tar.gz.
File metadata
- Download URL: flake8_no_implicit_concat-0.3.7.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8472f2a6ddb11980e9bc35aa289d051e36d1e69c66ecd0fe5f5406ff8ab91e3a
|
|
| MD5 |
5af6110622b77242b2c8541a9bfa6503
|
|
| BLAKE2b-256 |
25275057b10b1729f686af41edd45fc434d96faf25d925aec43bb9b3f27a559a
|
File details
Details for the file flake8_no_implicit_concat-0.3.7-py3-none-any.whl.
File metadata
- Download URL: flake8_no_implicit_concat-0.3.7-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a173b4720fed1611b9b127e194aa7e46aa86fed3425df8d37267b78cbbae2e07
|
|
| MD5 |
76ca8790568af23d51b0859375db3bff
|
|
| BLAKE2b-256 |
11434eb677c2e8d165dc89d05421b36850b1f06d69e6996622d6599ab85b309b
|