skillfed

flake8-pie

A flake8 extension that implements misc. lints

flake8-pie v0.16.0 73.7K downloads/30d#14,944 on PyPI65
Permissive license BSD-2-Clause Abandoned released

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

uv

uv add flake8-pie

poetry

poetry add flake8-pie

Installing 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

Environment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Quality Assurance

Tags

flake8 linter pluginpython code quality checksexception handling lintunnecessary variable detectiontype checking linterpython style violationscode smell detection
flake8-plugincode-qualityabandoned

More Quality Assurance packages