flake8-blind-except is a `flake8` extension that identifies "blind" `except:` statements in Python code, specifically bare `except:` or `except Exception:` without logging or re-raising. It helps enforce better error handling practices by flagging these broad catches. The current version is 0.2.1, and its release cadence is slow, indicating a mature and stable plugin.
pip install flake8-blind-exceptNo compatibility data collected yet for this library.
To quickly verify `flake8-blind-except`, install both `flake8` and the plugin. Then, create a simple Python file containing a bare `except:` statement. Running `flake8` against this file will demonstrate the plugin's `B902` error detection.
Ensure `pip install flake8` is run in your environment alongside `flake8-blind-except`.
Review your `flake8` configuration to ensure `B902` is not explicitly ignored and that no `select` directive is preventing its execution.
For more rigorous error handling checks, consider additional `flake8` plugins or custom rules that analyze exception types and handling logic more deeply.
Install `flake8` and `flake8-blind-except` together: `pip install flake8 flake8-blind-except`.
First, verify installation with `pip show flake8-blind-except`. Then, check your `flake8` configuration files (e.g., `pyproject.toml`, `setup.cfg`, `.flake8`) for `ignore = B902` or `select = ...` directives.
Upgrade `flake8-blind-except` to version 0.2.1 or newer: `pip install --upgrade flake8-blind-except`.