flake8-commas
Flake8 lint for trailing commas.
Decision gist · record as of 2026-08-14
Yes, if you use flake8 and want to enforce trailing comma consistency to reduce merge conflicts. The plugin is lightweight, permissive, and integrates seamlessly. However, note that maintenance is aging (last release 820 days ago); if you need active support or compatibility with very recent Python/flake8 versions, consider black or add-trailing-comma as alternatives.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires flake8 to be installed and Python 3.8 or later.
- Low friction: pure Python wheel with only flake8 as a runtime dependency.
- Maintenance status is aging—last release was 820 days ago—but the repository remains active and the project was recently revived after a naming transition in version 4.0.0 (2024-05-16).
License · maintenance · safety
permissive license (permissive) — Permissive license (MIT) means you can use this freely in commercial and private projects without restriction or attribution requirement.
last release 2024-05-16 (820 days) · last repo commit 2026-01-05 · 134 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 310,448 downloads/mo, #7,746 on PyPI
Alternatives
Verify before relying
pip install flake8-commas
# Then run flake8 normally; the plugin activates automatically
flake8 your_file.py
# Errors like C812 (missing trailing comma) will appear in output- Whether the aging maintenance status (820 days since last release) affects compatibility with very recent Python or flake8 versions.
- How this plugin's comma rules interact with or differ from black or add-trailing-comma when used together.
What it is and what it does
flake8-commas is a linter plugin that checks trailing comma placement in Python code. It integrates directly into flake8 and runs as part of your normal linting workflow, reporting errors (C812–C819) when commas are missing or incorrectly placed in multi-line structures. The plugin is designed to enforce consistent comma style across dictionaries, lists, function arguments, and tuples, which reduces merge conflicts when multiple developers edit the same data structures.
The plugin supports multiple Python versions with version-specific rules: different comma requirements apply to Python 2, Python 3, Python 3.5+, and Python 3.6+. It handles edge cases like bare tuples, lambda parameters, subscripts with slices, and function definitions with unpacking. The package is permissive (MIT license) and has low installation friction—it's a pure Python wheel with only flake8 as a dependency.
Use it for
- Enforce trailing commas in team codebases to reduce merge conflicts when multiple developers modify adjacent lines in lists or dicts.
- Catch accidental trailing commas that turn expressions into tuples (e.g., json_data = json.dumps({...}), becomes a tuple instead of the result).
- Lint Python 3.5+ and 3.6+ codebases with version-specific comma rules by configuring which error codes to enforce.
- Integrate comma style checking into CI/CD pipelines as part of flake8 without adding a separate tool.
- Prevent bare tuple syntax errors and lambda parameter comma mistakes during code review.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use flake8 and want to enforce trailing comma consistency to reduce merge conflicts.
The plugin is lightweight, permissive, and integrates seamlessly. However, note that maintenance is aging (last release 820 days ago); if you need active support or compatibility with very recent Python/flake8 versions, consider black or add-trailing-comma as alternatives.
Install
flake8-commas on PyPI
Before you install
Low friction: pure Python wheel with only flake8 as a runtime dependency. Maintenance status is aging—last release was 820 days ago—but the repository remains active and the project was recently revived after a naming transition in version 4.0.0 (2024-05-16).
Requires flake8 to be installed and Python 3.8 or later.
License in practice
Permissive license (MIT) means you can use this freely in commercial and private projects without restriction or attribution requirement.
Quickstart
pip install flake8-commas
# Then run flake8 normally; the plugin activates automatically
flake8 your_file.py
# Errors like C812 (missing trailing comma) will appear in output
Verify before relying
- Whether the aging maintenance status (820 days since last release) affects compatibility with very recent Python or flake8 versions.
- How this plugin's comma rules interact with or differ from black or add-trailing-comma when used together.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageflake8 |
| Maintenance | Aging 820 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 310,448 / month, #7,746 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: flake8_commas-4.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flake8 trailing comma enforcement”
- flake8-commasA flake8 plugin that enforces trailing comma placement in Python code…
- add-trailing-commaAutomatically adds trailing commas to multi-line Python function…
- jstylesonParses JSON strings that contain JavaScript-style comments…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also add-trailing-comma · flake8-implicit-str-concat · flake8 · flake8-tuple · flake8-picky-parentheses · flake8-import-order · flake8-docstrings · flake8-gl-codeclimate · flake8-json · flake8-pyi