flake8-pie
A flake8 extension that implements misc. lints
What it is and what it does
flake8-pie is a flake8 plugin that adds linting rules to detect common code quality issues beyond flake8's built-in checks. It flags patterns like assigning a value and immediately returning it, catching overly broad exceptions (bare except, BaseException, Exception), unnecessary len() or bool() calls in conditionals, imprecise type comparisons, redundant pass statements, and structural issues like inheriting from object or defining enums as plain classes. The plugin integrates directly into flake8's workflow and requires only typing_extensions as a runtime dependency.
The package is designed for developers who want stricter code-quality enforcement during linting. However, it has been abandoned since early 2023—the repository is archived, no commits have been made since 2023-02-21, and no releases are planned. This means compatibility issues with newer versions of flake8 or Python will not be fixed by the maintainer.
Use it for:
- Enforce precise exception handling in a codebase by flagging bare except blocks and overly broad exception catches.
- Detect unnecessary intermediate variables that are assigned and immediately returned, reducing code verbosity.
- Catch redundant type checks and suggest isinstance() instead for better type refinement.
- Flag unnecessary len() and bool() calls in conditionals where truthiness checks are more idiomatic.
- Identify structural anti-patterns like inheriting from object or using classes for namespacing instead of modules.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A flake8 plugin that detects code quality issues including unnecessary variables, imprecise exception handling, redundant type checks, and style violations across Python code.
Yes, if you are already using flake8 and want stricter code-quality checks, and you can tolerate that the package is unmaintained. The low install friction and permissive license make it safe to add. However, do not rely on it for new projects or in environments where you expect regular flake8 or Python upgrades, as incompatibilities will not be fixed. For active projects, verify that the specific lints align with your team's style before adopting.
Install
flake8-pie on PyPI
pip
pip install flake8-pieuv
uv add flake8-piepoetry
poetry add flake8-pieInstalling flake8-pie
Before you install
Low install friction with a single lightweight runtime dependency. However, the package is abandoned—last commit was 2023-02-21 and no releases since 2022-08-08. New bugs or incompatibilities with future flake8 or Python versions will not be addressed.
License in practice
BSD-2-Clause is permissive and poses no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install flake8-pie
# Then run flake8 on your code; the plugin auto-registers
flake8 your_file.py
# Example: detects unnecessary len() in conditionals
if len(items): # flagged by plugin
pass
Requires flake8 to be installed and configured; the plugin only works as a flake8 extension, not standalone.
Verify before relying
- Whether the plugin remains compatible with flake8 versions released after 2022-08-08 and current Python versions.
- Whether any of the linting rules have false-positive rates that would make them unsuitable for continuous integration.
- Specific count and names of all linting rules implemented beyond what the description excerpt shows.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing_extensions |
| Maintenance | abandoned — 1,467 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 73,708/month — #14,944 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flake8_pie-0.16.0-py3-none-any.whl
Keywords: flake8, lint
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
flake8-comprehensionsA flake8 plugin that detects and suggests…
permissive · top 5,000 on PyPI
flake8-returnA flake8 plugin that detects and flags…
permissive · top 15,000 on PyPI
flake8-pyiA Flake8 plugin that lints Python type stub…
permissive · top 5,000 on PyPI
flake8-typing-importsA flake8 plugin that detects unguarded typing…
permissive · top 15,000 on PyPI
flake8-use-pathlibA flake8 plugin that detects uses of os and…
permissive · top 15,000 on PyPI
flake8-pytest-styleA flake8 plugin that detects and reports style…
unclear · top 15,000 on PyPI
flake8-tidy-importsA flake8 plugin that detects and reports…
permissive · top 15,000 on PyPI
flake8-logging-formatA flake8 extension that enforces logging best…
permissive · top 15,000 on PyPI
flake8-noqaA flake8 plugin that validates the formatting…
copyleft · top 5,000 on PyPI
flake8-loggingA Flake8 plugin that detects and flags common…
permissive · top 15,000 on PyPI