flake8-tuple
Check code for 1 element tuple.
What it is and what it does
flake8-tuple is a linter plugin for flake8 that catches a specific Python syntax mistake: one-element tuples created by accident. In Python, writing `foo = 123,` creates a tuple instead of assigning a plain integer, and this plugin detects such cases and reports them as warning T801. It integrates directly into flake8's checking pipeline, so once installed, it runs automatically alongside other flake8 checks.
The plugin has no runtime dependencies beyond flake8 itself and installs as a pure Python wheel. It was last updated in December 2019 and is no longer actively maintained, though the repository remains public and unfixed issues may still exist in edge cases.
Use it for:
- Catch accidental one-element tuple assignments in code review or CI pipelines using flake8.
- Enforce consistent tuple syntax in Python codebases to prevent subtle bugs from trailing commas.
- Add tuple-specific linting rules to an existing flake8 setup without installing additional tools.
- Identify legacy code that may have unintended tuple assignments from typos or refactoring mistakes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A flake8 plugin that detects unintended one-element tuples in Python code, flagging them with warning T801.
Yes, if you are actively using flake8 and want to catch one-element tuple mistakes. The plugin is simple, has no dependencies, and the check it performs is narrow and useful. However, be aware that it is abandoned and may not work with very recent Python or flake8 versions—test it in your environment first.
Install
flake8-tuple on PyPI
pip
pip install flake8-tupleuv
uv add flake8-tuplepoetry
poetry add flake8-tupleInstalling flake8-tuple
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2019-12-05 and last commit 2021-10-17—so it will not receive updates for newer Python versions or flake8 API changes.
License in practice
BSD license is permissive, allowing use in most projects without restriction.
Quickstart
pip install flake8-tuple
Then run flake8 on your code:
flake8 --version
The output will show flake8-tuple is loaded. Code like `foo = 123,` will trigger warning T801.
Requires flake8 or pycodestyle to be installed; the plugin integrates as a flake8 extension.
Verify before relying
- Whether the plugin remains compatible with current flake8 versions given the lack of maintenance since 2021.
- Whether false positives mentioned in the changelog have been fully resolved.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,444 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 140,521/month — #11,270 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_tuple-0.4.1-py2.py3-none-any.whl
Keywords: flake8_tuple
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8-blind-exceptA flake8 plugin that detects overly broad…
permissive · top 15,000 on PyPI
flake8-polyfillProvides compatibility helpers for Flake8…
permissive · top 5,000 on PyPI
flake8-bugbearA flake8 plugin that detects likely bugs and…
permissive · top 5,000 on PyPI
flake8-comprehensionsA flake8 plugin that detects and suggests…
permissive · top 5,000 on PyPI
flake8-commasA flake8 plugin that enforces trailing comma…
permissive · top 15,000 on PyPI
flake8-pyiA Flake8 plugin that lints Python type stub…
permissive · top 5,000 on PyPI
flake8-executableA Flake8 plugin that detects and reports…
copyleft · top 15,000 on PyPI
pytest-flake8A pytest plugin that runs flake8 PEP8…
permissive · top 15,000 on PyPI
pep8-namingA flake8 plugin that checks Python code for…
permissive · top 5,000 on PyPI