$npx skillfedfor your agent

mccabe

McCabe checker, plugin for flake8

Worth itPyPI Python ModulesReleased Jan 202293.9M downloads / moExpat licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mccabe-0.7.0-py2.py3-none-any.whl
v0.7.0 · released 2022-01-24 · Python >=3.6

Yes. mccabe is a stable, zero-dependency tool for a well-understood metric (cyclomatic complexity). Install it if you use flake8 and want to enforce complexity limits, or if you need a standalone complexity scanner. The MIT license, active maintenance, and broad Python version support make it a safe, practical addition to code-quality workflows.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.6 or later.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained with recent commits; supports current Python versions (3.6+).

License · maintenance · safety

Expat license (permissive) — MIT (Expat) license permits commercial and private use with minimal restrictions—safe for most projects.

last release 2022-01-24 (1663 days) · last repo commit 2026-06-28 · 681 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 93,922,648 downloads/mo, #364 on PyPI

Verify before relying

pip install mccabe

# Standalone: check complexity of a file
python -m mccabe --min 5 myfile.py

# Or integrate with flake8
flake8 --max-complexity 10 myproject/
  • Whether the flake8 plugin is automatically discovered or requires explicit configuration beyond --max-complexity.
  • Whether the package works with flake8 versions released after 2022-01-24 (the latest release date).
Same gist for agents: .md · .json

What it is and what it does

mccabe is a cyclomatic complexity checker for Python code. It measures the number of independent paths through a function's control flow—higher complexity indicates more branching and harder-to-test code. The package works as a standalone command-line tool to scan Python files and report functions exceeding a complexity threshold, and also integrates as a plugin into flake8 to flag violations during linting with the C901 error code.

The tool is lightweight, dependency-free, and widely used in code-quality pipelines. It helps teams enforce complexity limits (McCabe's research suggests anything beyond 10 is too complex) and identify functions that may benefit from refactoring. When used with flake8, violations can be silenced on a per-function basis with a `# noqa: C901` comment.

Use it for

  • Enforce maximum function complexity in CI/CD pipelines to prevent overly branched code from being merged.
  • Identify refactoring candidates in legacy codebases by scanning for functions exceeding a complexity threshold.
  • Integrate complexity checks into flake8-based linting workflows alongside other code-quality rules.
  • Measure code maintainability metrics as part of technical debt tracking.
  • Suppress complexity warnings on specific functions where high complexity is justified with inline `# noqa` comments.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

mccabe is a stable, zero-dependency tool for a well-understood metric (cyclomatic complexity). Install it if you use flake8 and want to enforce complexity limits, or if you need a standalone complexity scanner. The MIT license, active maintenance, and broad Python version support make it a safe, practical addition to code-quality workflows.

Install

mccabe on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent commits; supports current Python versions (3.6+).

Requires Python 3.6 or later.

License in practice

MIT (Expat) license permits commercial and private use with minimal restrictions—safe for most projects.

Quickstart

pip install mccabe

# Standalone: check complexity of a file
python -m mccabe --min 5 myfile.py

# Or integrate with flake8
flake8 --max-complexity 10 myproject/

Verify before relying

  • Whether the flake8 plugin is automatically discovered or requires explicit configuration beyond --max-complexity.
  • Whether the package works with flake8 versions released after 2022-01-24 (the latest release date).

Package facts

LicenseExpat license permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 1,663 days since the last release
Last repo commit
First released
Downloads93,922,648 / month, #364 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Evidence: mccabe-0.7.0-py2.py3-none-any.whl

Tags

Capabilities
cyclomatic complexity checkercode complexity analysis pythonflake8 complexity pluginmccabe complexityfunction complexity measurementcode quality metricsdetect complex functions
Topics
code-qualitylintingcomplexity-analysis
PyPI keywords
flake8mccabe

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 › “cyclomatic complexity checker”

  • mccabeMeasures cyclomatic complexity of Python functions and integrates…
  • xenonXenon monitors Python code complexity by measuring cyclomatic…
  • flake8-cognitive-complexityA flake8 extension that checks Python code for cognitive complexity,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

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.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

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.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

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…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also flake8 · flake8-cognitive-complexity · xenon · radon · lizard · complexipy · cognitive-complexity · flake8-expression-complexity · wemake-python-styleguide · flake8-annotations-complexity