skillfed

flake8-no-implicit-concat

Flake8 plugin that forbids implicit str/bytes literal concatenations

flake8-no-implicit-concat v0.3.7 355.3K downloads/30d#7,291 on PyPI20
Permissive license MIT Active released

What it is and what it does

flake8-no-implicit-concat is a flake8 plugin that catches a specific style violation: implicit concatenation of string and bytes literals. Python allows adjacent string literals to merge automatically (e.g., 'foo' 'bar' becomes 'foobar'), but this can hide bugs and reduce code clarity. The plugin flags these cases with four violation codes—NIC001 and NIC002 for str literals on one line or across multiple lines, and NIC101 and NIC102 for bytes literals—and requires you to either merge the literals explicitly or use the + operator.

It integrates directly into flake8's linting pipeline, so once installed, it runs automatically whenever you invoke flake8. The plugin supports Python 3.6 through 3.13 and has no external system dependencies beyond flake8 itself, making it straightforward to add to existing projects.

Use it for:

  • Enforce consistent string concatenation style in a team codebase to prevent accidental literal merging.
  • Catch potential bugs where multi-line string literals were meant to be separate but implicitly merged.
  • Integrate into CI/CD pipelines to reject code with implicit concatenations before merge.
  • Add to a linting ruleset for projects that prefer explicit + operators over implicit concatenation.
  • Audit legacy code to identify and refactor implicit concatenations into clearer forms.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A flake8 plugin that detects and forbids implicit string and bytes literal concatenations, enforcing explicit concatenation syntax.

Yes. This is a lightweight, actively maintained flake8 plugin with no security vulnerabilities and low install friction. Install it if your team prefers to forbid implicit string/bytes concatenation; skip it if you have no opinion on the style or prefer implicit concatenation. The choice is purely stylistic—the plugin does one thing well and integrates cleanly into flake8.

Install

flake8-no-implicit-concat on PyPI

pip

pip install flake8-no-implicit-concat

uv

uv add flake8-no-implicit-concat

poetry

poetry add flake8-no-implicit-concat

Installing flake8-no-implicit-concat

Before you install

Low friction install as a pure Python wheel. Actively maintained with recent commits and no known vulnerabilities. Depends only on flake8 and more-itertools, both widely available.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed projects with minimal attribution requirements.

Quickstart

pip install flake8-no-implicit-concat

# Then run flake8 on your code; the plugin auto-registers
flake8 myfile.py

# Violations use codes NIC001, NIC002 (str) and NIC101, NIC102 (bytes)

Requires flake8 to be installed and your project to use Python 3.6 or later.

Verify before relying

  • Whether the plugin integrates seamlessly with existing flake8 configurations and other plugins.
  • Performance impact when checking large codebases with many string literals.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 2 — flake8, more-itertools
Maintenance actively maintained — 647 days since the last release
Last repo commit
First released
Downloads 355,317/month — #7,291 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flake8_no_implicit_concat-0.3.7-py3-none-any.whl

Keywords: flake8

Environment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Tags

flake8 implicit string concatenationdetect implicit str concatforbid implicit bytes concatstring literal concatenation linterflake8 code style pluginimplicit concatenation checker
lintingcode-styleflake8-plugin

More Python Modules packages