flake8-picky-parentheses
flake8 plugin to nitpick about parenthesis, brackets, and braces
What it is and what it does
Picky Parentheses is a flake8 plugin that adds two independent checkers to your linting workflow. The first detects redundant parentheses, brackets, and braces—pairs that can be safely removed without changing code semantics—while respecting exceptions like tuple literals, operator precedence hints, and multi-line expressions. The second checker enforces opinionated alignment rules for these delimiters, flagging cases where opening and closing brackets don't align properly across lines.
The plugin uses Python's tokenize and ast modules to determine redundancy by attempting to remove each pair and verifying the code still compiles to the same AST. Both checkers emit distinct error codes (PAR0xx for redundancy, PAR1xx for alignment), so you can selectively enable or disable either one. It supports Python 3.7 through 3.14 and integrates directly into flake8's standard workflow.
Use it for:
- Enforce consistent parenthesis style across a team codebase by catching unnecessary delimiters that clutter readability.
- Catch alignment mistakes in multi-line function calls, list literals, and conditional expressions during code review.
- Selectively enable only the redundancy checker (PAR0) if you prefer not to enforce the opinionated alignment rules.
- Identify tuple unpacking mistakes where parentheses are used incorrectly in assignment expressions.
- Maintain consistent bracket alignment in complex nested structures like comprehensions and dictionary definitions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A flake8 plugin that detects and reports redundant parentheses, brackets, and braces, plus enforces alignment rules for these delimiters.
Yes. This is a low-friction, actively maintained flake8 plugin with no known vulnerabilities, permissive licensing, and clear error codes that let you tune enforcement to your team's preferences. Install it if your codebase would benefit from stricter parenthesis hygiene; disable the alignment checker (PAR1) if you find it too opinionated.
Install
flake8-picky-parentheses on PyPI
pip
pip install flake8-picky-parenthesesuv
uv add flake8-picky-parenthesespoetry
poetry add flake8-picky-parenthesesInstalling flake8-picky-parentheses
Before you install
Low friction: pure Python wheel with only flake8 as a runtime dependency. Actively maintained as of 2026-01-10, with recent commits and no archived status.
License in practice
Apache License 2.0 is permissive; you can use this plugin freely in commercial and private projects with minimal restrictions.
Quickstart
pip install flake8-picky-parentheses
flake8 --select='PAR0,PAR1' '<path/to/code>'
# Or to disable the opinionated alignment checker:
flake8 --extend-ignore='PAR1' '<path/to/code>'
Requires flake8 to be installed; flake8 >= 5.0.0 is needed if you want to use the --require-plugins option.
Verify before relying
- Whether the plugin's AST-based redundancy detection handles all edge cases in practice across real codebases.
- Performance impact when running on large projects with many files.
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — flake8 |
| Maintenance | actively maintained — 216 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 293,554/month — #7,953 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_picky_parentheses-0.6.2-py3-none-any.whl
Keywords: flake8, plugin, redundant, superfluous, extraneous, unnecessary, parentheses, parenthesis, parens, brackets, linter, linting, codestyle, code style
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
flake8-quotesA flake8 plugin that enforces consistent quote…
permissive · top 5,000 on PyPI
flake8-implicit-str-concatA Flake8 plugin that detects and reports…
permissive · top 15,000 on PyPI
flake8-commasA flake8 plugin that enforces trailing comma…
permissive · top 15,000 on PyPI
flake8Flake8 is a command-line tool that combines…
permissive · top 1,000 on PyPI
flake8_simplifyA flake8 plugin that detects and flags…
permissive · top 15,000 on PyPI
wemake-python-styleguideA flake8 plugin that enforces strict,…
permissive · top 15,000 on PyPI
flake8-noqaA flake8 plugin that validates the formatting…
copyleft · top 5,000 on PyPI
flake8-pieA flake8 plugin that detects code quality…
permissive · top 15,000 on PyPI
flake8-broken-lineA flake8 plugin that detects and forbids…
permissive · top 15,000 on PyPI
ioc-fangerConverts defanged indicators of compromise…
permissive · top 15,000 on PyPI