Skip to main content

The plugin checks `if expressions` (ternary operator)

Project description

flake8-if-expr

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

Check for if expression (ternary operator).

This module provides a plugin for flake8, the Python code checker.

Installation

pip install flake8-if-expr

Example

# code.py
x = 1 if 2 else 3
$ flake8 code.py
./code.py:1:5: KEK100 don`t use "[on_true] if [expression] else [on_false]" syntax
x = 1 if 2 else 3
    ^

License

MIT

Change Log

1.0.0 - 2019.05.23

  • update flake8-plugin-utils version to v1.0

0.2.1 - 2019.02.26

  • update flake8-plugin-utils version

0.2.0 - 2019.02.09

  • Rewriting with flake8-plugin-utils

0.1.1 - 2019.02.08

  • Remove pycodestyle from dependencies
  • KEK101 error code #2

0.1.0 - 2019.02.07

  • First release

Project details


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-expr, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_if_expr-1.0.0-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size flake8-if-expr-1.0.0.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page