--- id: flake8-bugbear version: "25.11.29" license: MIT license_treatment: permissive maintenance: active --- # 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. License: permissive · Maintenance: active · Downloads: 5.0M/mo ## 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 above — verify before relying. A flake8 plugin that detects likely bugs and design problems in Python code through opinionated linting rules not covered by pyflakes or pycodestyle. 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 pip install flake8-bugbear uv add flake8-bugbear poetry add flake8-bugbear ## Installing flake8-bugbear 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. 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 Requires Python 3.10 or later and flake8 to be installed. 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_current - Install friction: low - Maintenance: active - Downloads: 5.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags flake8 plugin for bug detection, python linter for common mistakes, code quality checks for design problems, flake8 bugbear warnings, python static analysis plugin, linting tool for python bugs, code smell detector, linting, static-analysis, code-quality [View on SkillFed](https://skillfed.io/packages/flake8-bugbear) · [View on PyPI](https://pypi.org/project/flake8-bugbear/)