flake8-bugbear
A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.
Decision gist · record as of 2026-08-14
Yes. flake8-bugbear is worth installing if you use flake8 and want to catch real bugs and design problems that the standard linters miss. It has low install friction, active maintenance, no security issues, and a permissive license. The only caveat is that its rules are opinionated—review the warning list to confirm they align with your team's coding standards before adopting it widely.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later and flake8 to be installed.
- Installs with minimal friction—a pure-Python wheel with only flake8 and attrs as runtime dependencies.
- Actively maintained with a recent release and steady commit activity.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with only attribution required.
last release 2025-11-29 (258 days) · last repo commit 2026-08-11 · 1,115 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,041,661 downloads/mo, #2,177 on PyPI
Alternatives
Verify before relying
pip install flake8-bugbear
flake8 your_code.py
# Automatically integrated into flake8; check detection with:
flake8 --version- Specific count and scope of all warning rules beyond the B001–B027 examples shown in the description excerpt.
- Performance impact on large codebases or CI/CD pipelines.
- Configurability and rule-suppression mechanisms beyond standard flake8 configuration.
What it is and what it does
flake8-bugbear is a flake8 plugin that extends Python linting with opinionated checks for bugs and design antipatterns. It fills a gap between the core linters (pyflakes and pycodestyle) and more comprehensive tools by focusing on patterns that are genuinely problematic but too specific or debatable for the main Python tooling. The plugin runs automatically once installed and integrated with flake8, adding warnings like B001 (bare except clauses), B006 (mutable default arguments), B008 (function calls in defaults), and many others that catch real mistakes developers commonly make.
The package depends on flake8 and attrs, both widely used and stable. It supports current Python versions (3.10 through 3.14) and has been actively maintained since 2016. With no known security vulnerabilities and a permissive MIT license, it is designed to be deployed flexibly across different projects and environments. The plugin's opinionated nature is intentional—rules live here precisely because they do not belong in standardized tools, giving teams the choice to adopt them or not.
Use it for
- Catch bare except clauses and other exception-handling mistakes that can mask serious bugs.
- Detect mutable default arguments and function calls in defaults that cause subtle state-sharing bugs.
- Flag redundant exception types in except blocks and other code patterns that waste CPU or cause confusion.
- Identify loop control variables that override iterables or are unused, catching common loop mistakes.
- Enforce better practices in abstract base classes and context managers.
- Integrate into CI/CD pipelines to enforce consistent code quality standards across a team.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
flake8-bugbear is worth installing if you use flake8 and want to catch real bugs and design problems that the standard linters miss. It has low install friction, active maintenance, no security issues, and a permissive license. The only caveat is that its rules are opinionated—review the warning list to confirm they align with your team's coding standards before adopting it widely.
Install
flake8-bugbear on PyPI
Before you install
Installs with minimal friction—a pure-Python wheel with only flake8 and attrs as runtime dependencies. Actively maintained with a recent release and steady commit activity.
Requires Python 3.10 or later and flake8 to be installed.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with only attribution required.
Quickstart
pip install flake8-bugbear
flake8 your_code.py
# Automatically integrated into flake8; check detection with:
flake8 --version
Verify before relying
- Specific count and scope of all warning rules beyond the B001–B027 examples shown in the description excerpt.
- Performance impact on large codebases or CI/CD pipelines.
- Configurability and rule-suppression mechanisms beyond standard flake8 configuration.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesflake8attrs |
| Maintenance | Actively maintained 258 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,041,661 / month, #2,177 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: flake8_bugbear-25.11.29-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flake8 plugin for bug detection”
- flake8-bugbearA flake8 plugin that detects likely bugs and design problems in…
- flake8-printA flake8 plugin that detects print statements and pprint calls in…
- flake8-eradicateA flake8 plugin that detects commented-out code in Python files and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also flake8 · flake8-mutable · flake8-pyi · flake8-bandit · flake8-comprehensions · flake8-blind-except · flake8-tuple · pyflakes · flake8-print · flake8-debugger