Skip to main content

Check for if expression (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

0.1.0 - 2019.02.07

  • First release

0.1.1 - 2019.02.08

  • Remove pycodestyle from dependencies
  • KEK101 error code #2

Project details


Download files

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

Source Distribution

flake8-if-expr-0.1.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

flake8_if_expr-0.1.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page