skillfed

flake8-tuple

Check code for 1 element tuple.

flake8-tuple v0.4.1 140.5K downloads/30d#11,270 on PyPI24
Permissive license BSD Abandoned released

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-tuple

uv

uv add flake8-tuple

poetry

poetry add flake8-tuple

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Tags

flake8 plugin tuple detectionone element tuple linterpython code style checkerflake8 extensiontuple syntax lintingcode quality flake8
lintingflake8-plugin

More Quality Assurance packages