flake8-tuple

raw JSON →
0.4.1 verified Fri May 01 auth: no python

Flake8 plugin that checks for 1-element tuples written as `x,` instead of `(x,)`, and other tuple-related style issues. Version 0.4.1, stable but rarely updated.

pip install flake8-tuple
error ModuleNotFoundError: No module named 'flake8.tuple'
cause Incorrect import: trying to import flake8.tuple instead of flake8_tuple.
fix
Do not import anything explicitly; just install flake8-tuple and run flake8.
error flake8: TUPLE100 not reported
cause Plugin not installed or flake8 version too old (<3.0.0).
fix
Ensure flake8>=3.0.0 and install flake8-tuple: pip install flake8-tuple --upgrade
gotcha Plugin only registers one check code: TUPLE100 (1-element tuple). It does not check for other tuple pitfalls.
fix Use other tools like pylint or mypy for comprehensive tuple checks.
gotcha The plugin requires flake8 version 3.0.0 or later due to new plugin registration API.
fix Upgrade flake8 to >=3.0.0 and upgrade flake8-tuple to >=0.4.0.

Install the plugin and run flake8. The plugin automatically registers checks TUPLE100.

pip install flake8-tuple
# Then run flake8 on your Python files:
flake8 mymodule.py