Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flake8-if-statements

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flake8-if-statements

Flake8 linter for if statements

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc