$npx skillfedfor your agent

flake8-cognitive-complexity

An extension for flake8 that validates cognitive functions complexity

SkipPyPI Python ModulesReleased Aug 2020298.5K downloads / moMITSource build

Decision gist · record as of 2026-08-14

sdist only — flake8_cognitive_complexity-0.1.0.tar.gz · builds from source
v0.1.0 · released 2020-08-01 · Python >=3.6

No. The package is abandoned (last update 2021-02-24) and untested with modern Python or flake8 versions. While the idea is sound and the MIT license is permissive, the lack of maintenance means you risk compatibility breakage and unpatched issues. Consider an actively maintained alternative or a more recent cognitive-complexity linter.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires flake8 to be installed; tested on flake8 3.7.8 and Python 3.7.x, but package is unmaintained since 2021.
  • High install friction due to no runtime dependencies, but the package is abandoned—last release was 2020-08-01 and last commit 2021-02-24.
  • It may not work with recent flake8 or Python versions without maintenance.

License · maintenance · safety

MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution.

last release 2020-08-01 (2204 days) · last repo commit 2021-02-24 · 71 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 298,539 downloads/mo, #7,873 on PyPI

Verify before relying

pip install flake8-cognitive-complexity
flake8 --max-cognitive-complexity=7 your_file.py
  • Compatibility with flake8 versions released after 2021 and modern Python versions (3.9+)
  • Whether the package still functions as a working flake8 plugin in current environments
Same gist for agents: .md · .json

What it is and what it does

flake8-cognitive-complexity is a flake8 linter plugin that measures cognitive complexity—a metric for how difficult a piece of code is to understand—introduced by G. Ann Campbell and used by SonarSource and CodeClimate. It analyzes Python functions and reports violations when complexity exceeds a threshold you set, defaulting to 7. The plugin integrates directly into flake8's workflow and emits error code CCR001 when a function's cognitive complexity is too high.

The package has no runtime dependencies and works by analyzing control flow in your code. However, it is abandoned: the last release was 2020-08-01 and the last commit to the repository was 2021-02-24. This means it may not be compatible with recent versions of flake8 or Python versions beyond 3.8, and bugs or incompatibilities will not be fixed.

Use it for

  • Enforce a maximum cognitive complexity threshold in CI/CD pipelines to catch overly complex functions early.
  • Identify functions that are hard to understand and maintain as part of code review workflows.
  • Set project-wide complexity standards using the --max-cognitive-complexity option in flake8 configuration.
  • Measure code quality improvements over time by tracking cognitive complexity violations in your codebase.

Worth the install?

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

Skip

No.

The package is abandoned (last update 2021-02-24) and untested with modern Python or flake8 versions. While the idea is sound and the MIT license is permissive, the lack of maintenance means you risk compatibility breakage and unpatched issues. Consider an actively maintained alternative or a more recent cognitive-complexity linter.

Install

flake8-cognitive-complexity on PyPI

Before you install

High install friction due to no runtime dependencies, but the package is abandoned—last release was 2020-08-01 and last commit 2021-02-24. It may not work with recent flake8 or Python versions without maintenance.

Requires flake8 to be installed; tested on flake8 3.7.8 and Python 3.7.x, but package is unmaintained since 2021.

License in practice

MIT license is permissive and poses no restrictions on use, modification, or distribution.

Quickstart

pip install flake8-cognitive-complexity
flake8 --max-cognitive-complexity=7 your_file.py

Verify before relying

  • Compatibility with flake8 versions released after 2021 and modern Python versions (3.9+)
  • Whether the package still functions as a working flake8 plugin in current environments

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.6
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceAbandoned 2,204 days since the last release
Last repo commit
First released
Downloads298,539 / month, #7,873 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Environment :: ConsoleFramework :: Flake8Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: DocumentationTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Evidence: flake8_cognitive_complexity-0.1.0.tar.gz

Tags

Capabilities
flake8 cognitive complexity checkercode complexity linter pluginfunction complexity validationflake8 extension quality assurancemeasure code understandabilitycyclomatic complexity alternativecode maintainability analysis
Topics
code-qualitylinter-pluginunmaintained
PyPI keywords
flake8

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 cognitive complexity checker”

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 cognitive-complexity · complexipy · flake8-expression-complexity · lizard · mccabe · flake8-functions · flake8-annotations-complexity · xenon · flake8 · wemake-python-styleguide