Flake8 plugin that forbids implicit str/bytes literal concatenations
Maintained. Last release 2 weeks ago, commits in 6 of the last 26 weeks. Weaker on release cadence and contributor spread.
$
pip install flake8-no-implicit-concatflake8-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. - Set of strict flake8 rules with several plugins as dependencies. It implements , which also checks implicit string concatenations, as one of the many rules it defines.