Flake8 linter for if statements
Project description
flake8-if-statements
Description
Flake8 linter for if statements
Checks:
- IFS001: 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
- ...
1.0.0 - 2022-09-17
- Changed IFSTMT to IFS to comply with flake8
- Remove python3.6 support
0.1.0 - 2020-03-14
- initial
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flake8-if-statements-1.0.0.tar.gz
.
File metadata
- Download URL: flake8-if-statements-1.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de1a05c6840ed7ca419a0de6038a343317fe327401a91c887cd8661730662c9 |
|
MD5 | d905f19cc4c64726b41bc6b445656ce6 |
|
BLAKE2b-256 | 68cfeebf980e661cc05535228c1f3e73b4c8a2c15d8e047c06559ac38eb827e2 |
File details
Details for the file flake8_if_statements-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_if_statements-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a247fab5f409e3f2c18c3d92e1f7a9a9d1a8e0cd3aa1d446a17097e16ecddab |
|
MD5 | 9b68ea72f3a3b97c0aedce53b3158d9e |
|
BLAKE2b-256 | 4cd450c3630ffb4612b33c155ed69c4382002071327a6d6d66a06fc943de7e1f |