skillfed

flake8-blind-except

A flake8 extension that checks for blind except: statements

flake8-blind-except v0.2.1 132.1K downloads/30d#11,564 on PyPI32
Permissive license MIT Abandoned released

What it is and what it does

flake8-blind-except is a linter plugin that enforces more specific exception handling in Python code. It flags two patterns: bare except: statements (B901) and catch-all except Exception: blocks (B902), both of which hide the true intent of error handling and can inadvertently catch system signals. The plugin integrates directly into the linting workflow once installed.

The package is unmaintained as of its latest release in 2022-03-18, with the author explicitly stating they are no longer active in Python development. While it has modest popularity, the lack of recent updates means compatibility with newer Python or linting tool versions is uncertain. The core functionality—flagging overly broad exception handlers—remains sound for codebases that can verify compatibility with their environment.

Use it for:

  • Enforce exception specificity in code review by catching bare except: and except Exception: patterns during linting.
  • Improve code quality in legacy Python projects by identifying and refactoring catch-all exception handlers into specific exception types.
  • Educate team members on exception handling best practices by making blind exception catches visible during development.
  • Complement built-in linting checks by also catching broad Exception handlers beyond bare except: patterns.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A flake8 plugin that detects overly broad exception handlers—bare except: statements and catch-all except Exception: blocks—flagging them as B901 and B902 respectively.

Yes, if your environment is confirmed compatible with the last tested versions (flake8 3.7.9, Python 3.7.5). The plugin solves a real code-quality problem and has no security vulnerabilities. However, do not install if you require active maintenance or compatibility with very recent Python versions—test thoroughly first, since the package is abandoned and will not receive updates.

Install

flake8-blind-except on PyPI

pip

pip install flake8-blind-except

uv

uv add flake8-blind-except

poetry

poetry add flake8-blind-except

Installing flake8-blind-except

Before you install

High install friction: the package is abandoned (last commit 2023-01-18, no updates since 2022-03-18) and the maintainer explicitly notes they are not working on Python updates.

License in practice

MIT license is permissive and poses no restrictions on use or redistribution.

Quickstart

pip install flake8-blind-except
flake8 --version
flake8 your_code.py

Compatibility with Python versions and tool versions beyond those tested (flake8 3.7.9, Python 3.7.5) is not guaranteed.

Verify before relying

  • Whether the plugin remains compatible with current Python and flake8 versions beyond the tested versions (flake8 3.7.9 + Python 3.7.5).
  • Whether B902 detection for blind Exception catches is still needed given modern linting tool evolution since the last update.
  • Current compatibility status with flake8 versions released after 2022-03-18.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 1,610 days since the last release
Last repo commit
First released
Downloads 132,115/month — #11,564 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: flake8-blind-except-0.2.1.tar.gz

Keywords: flake8, except, exception

Tags

exception handling lintcatch-all except detectionblind exception checkerflake8 plugin exceptbare except linterexception specificity check
lintingexception-handling

More Quality Assurance packages