Metadata-Version: 2.3
Name: flake8-implicit-str-concat
Version: 0.5.0
Summary: Flake8 plugin to encourage correct string literal concatenation
Project-URL: Homepage, https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat
Author-email: Dylan Turner <58230987+keisheiled@users.noreply.github.com>
License: MIT
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: Flake8
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.9
Requires-Dist: more-itertools>=8.0.2; python_version <= '3.9'
Description-Content-Type: text/markdown

# flake8-implicit-str-concat

[![PyPI version](https://img.shields.io/pypi/v/flake8-implicit-str-concat.svg)](https://pypi.org/project/flake8-implicit-str-concat)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/flake8-implicit-str-concat.svg)](https://pypi.org/project/flake8-implicit-str-concat)
[![PyPI downloads](https://img.shields.io/pypi/dm/flake8-implicit-str-concat.svg)](https://pypistats.org/packages/flake8-implicit-str-concat)
[![GitHub](https://img.shields.io/github/license/flake8-implicit-str-concat/flake8-implicit-str-concat.svg)](LICENSE)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

This is a plugin for the Python code-checking tool [Flake8](https://flake8.pycqa.org/)
to encourage correct string literal concatenation.

It looks for style problems like implicitly concatenated string literals on the same
line (which can be introduced by the code-formatting tool
[Black](https://github.com/psf/black/issues/26)), or unnecessary plus operators for
explicit string literal concatenation.

## Install

```sh
pip install flake8-implicit-str-concat
```

## Example

```console
$ cat example.py
s = ('111111111111111111111'
     '222222222222222222222')
$ black example.py
reformatted example.py
All done! ✨ 🍰 ✨
1 file reformatted.
$ cat example.py
s = "111111111111111111111" "222222222222222222222"
$ flake8 example.py
example.py:1:28: ISC001 implicitly concatenated string literals on one line
$ edit example.py # Remove the " " and save
$ cat example.py
s = "111111111111111111111222222222222222222222"
$ black example.py
All done! ✨ 🍰 ✨
1 file left unchanged.
$ flake8 example.py
$
```

## Violation codes

The plugin uses the prefix `ISC`, short for Implicit String Concatenation.

| Code   | Description                                                      |
| ------ | ---------------------------------------------------------------- |
| ISC001 | implicitly concatenated string literals on one line              |
| ISC002 | implicitly concatenated string literals over continuation line   |
| ISC003 | explicitly concatenated string should be implicitly concatenated |

## Release Notes

You can find the release notes on the
[releases page](https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/releases).
