Check for if expression (ternary operator).
This module provides a plugin for flake8, the Python code checker.
pip install flake8-if-expr
# 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
^
MIT
- First release