Skip to main content

Flake8 linter for if statements

Project description

flake8-if-statements

pypi Python: 3.6+ Downloads Build Status Code coverage License: MIT Code style: black

Description

Flake8 linter for if statements

Checks:

  • IFSTMT001: Use one liner so as not to repeat assignment to the same variable

e.g:

Bad:

if x == 1:
    y = 10
else:
    y = 11

Good:

y = 10 if x == 1 else 11

Installation

pip install flake8-if-statements

Usage

flake8 <your code>

For developers

Create venv and install deps

make init

Install git precommit hook

make precommit_install

Run linters, autoformat, tests etc.

make pretty lint test

Bump new version

make bump_major
make bump_minor
make bump_patch

License

MIT

Change Log

Unreleased

  • ...

0.1.0 - 2020-03-14

  • initial

Project details


Release history Release notifications

Download files

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

Files for flake8-if-statements, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_if_statements-0.1.0-py3-none-any.whl (4.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-if-statements-0.1.0.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page