Skip to main content

Flake8 plugin that forbids implicit string literal concatenations

Project description

Github Actions codecov PyPI - Python Version PyPI version Downloads Code style: black

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8-no-implicit-concat-0.1.4.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flake8-no-implicit-concat-0.1.4.tar.gz.

File metadata

  • Download URL: flake8-no-implicit-concat-0.1.4.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for flake8-no-implicit-concat-0.1.4.tar.gz
Algorithm Hash digest
SHA256 736f927117997541c392eaf916a363d74152e514326b9a0ef5fa234604411cfd
MD5 31920863dded1196a4a6ef99bbff26b7
BLAKE2b-256 bc2c7f90cb48f7caafa6365f93486c01e68a7fc0f0728dfd6b296eee78831736

See more details on using hashes here.

File details

Details for the file flake8_no_implicit_concat-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: flake8_no_implicit_concat-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for flake8_no_implicit_concat-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f39394ab2c6df8c6d7e1079a26356de5bb275e57659ead4f1976b4618deb9bd
MD5 290b92c197e1cb8e9f488770801bf3bb
BLAKE2b-256 0362da084895aee8ce568cbbf9806e1363e203523102bbe13d5dd6fc2407d1de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page