GithubHelp home page GithubHelp logo

flake8-implicit-str-concat's Introduction

flake8-implicit-str-concat

PyPI version Supported Python versions PyPI downloads GitHub Code style: Black

This is a plugin for the Python code-checking tool Flake8 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), or unnecessary plus operators for explicit string literal concatenation.

Install

pip install flake8-implicit-str-concat

Example

$ 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 [https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/releases](releases page).

flake8-implicit-str-concat's People

Contributors

euandreh avatar hugovk avatar keisheiled avatar olivierlefloch avatar peterjc avatar pre-commit-ci[bot] avatar q0w avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.