Skip to main content

flake8-if-statements

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

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

Metadata

Release files for flake8-if-statements 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-if-statements 1.0.0
File Size Uploaded Provenance
flake8-if-statements-1.0.0.tar.gz 3.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-if-statements 1.0.0
File Interpreter ABI Platform
flake8_if_statements-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / flake8-if-statements-1.0.0.tar.gz

Download URL flake8-if-statements-1.0.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4de1a05c6840ed7ca419a0de6038a343317fe327401a91c887cd8661730662c9
BLAKE2b-256 checksum
How to use checksums
68cfeebf980e661cc05535228c1f3e73b4c8a2c15d8e047c06559ac38eb827e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / flake8_if_statements-1.0.0-py3-none-any.whl

Download URL flake8_if_statements-1.0.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a247fab5f409e3f2c18c3d92e1f7a9a9d1a8e0cd3aa1d446a17097e16ecddab
BLAKE2b-256 checksum
How to use checksums
4cd450c3630ffb4612b33c155ed69c4382002071327a6d6d66a06fc943de7e1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for flake8-if-statements 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page