$npx skillfedfor your agent

flake8-expression-complexity

A flake8 extension that checks expressions complexity

Worth itPyPI Python ModulesReleased Aug 2026341.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flake8_expression_complexity-0.1.1-py3-none-any.whl
v0.1.1 · released 2026-08-14 · Python >=3.10 · 1 runtime deps: flake8

Yes. This is a lightweight, well-maintained linter plugin with no security issues, permissive licensing, and a clear, narrow purpose. Install it if your team values expression readability and wants automated enforcement; the low friction and active maintenance make it a safe addition to any flake8 setup. Skip it only if your codebase already has strong code-review discipline around complexity or if you prefer other linting approaches.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction installation as a pure Python wheel with a single runtime dependency on flake8.
  • Actively maintained with a recent release and no known vulnerabilities.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for any project.

last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 33 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 341,486 downloads/mo, #7,402 on PyPI

Verify before relying

pip install flake8-expression-complexity

# Then run flake8 with optional configuration:
flake8 --max-expression-complexity=7 your_code.py
# or to skip Django ORM queries:
flake8 --max-expression-complexity=7 --ignore-django-orm-queries-complexity your_code.py
  • How expression complexity is actually scored (the algorithm or heuristic used beyond the example shown).
  • Whether the Django ORM query exemption works reliably across common query patterns.
  • Performance impact on large codebases or deeply nested expressions.
Same gist for agents: .md · .json

What it is and what it does

flake8-expression-complexity is a linter plugin that automatically flags expressions in your Python code that exceed a complexity threshold. It integrates directly into flake8's workflow, scoring each expression and raising an ECE001 error when complexity exceeds the configured limit (default 7). This helps catch hard-to-read conditional chains, nested operations, and other expressions that may reduce code maintainability.

The tool is particularly useful in Django projects, where ORM queries can produce long but readable expressions; you can optionally exclude those from complexity checks via a command-line flag. Configuration is straightforward through flake8's standard `--max-expression-complexity` option. The package is actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities.

Use it for

  • Enforce a team code-style rule that flags overly complex conditional expressions in pull request reviews.
  • Automatically detect and refactor deeply nested boolean logic in legacy codebases.
  • Configure stricter complexity thresholds in critical modules while relaxing them in Django query-heavy code.
  • Integrate into CI/CD pipelines to prevent commits with expressions exceeding a project's complexity budget.
  • Identify readability hotspots in conditional chains that would benefit from helper functions or intermediate variables.

Worth the install?

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

Worth it

Yes.

This is a lightweight, well-maintained linter plugin with no security issues, permissive licensing, and a clear, narrow purpose. Install it if your team values expression readability and wants automated enforcement; the low friction and active maintenance make it a safe addition to any flake8 setup. Skip it only if your codebase already has strong code-review discipline around complexity or if you prefer other linting approaches.

Install

flake8-expression-complexity on PyPI

Before you install

Low friction installation as a pure Python wheel with a single runtime dependency on flake8. Actively maintained with a recent release and no known vulnerabilities.

Requires Python 3.10 or later.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for any project.

Quickstart

pip install flake8-expression-complexity

# Then run flake8 with optional configuration:
flake8 --max-expression-complexity=7 your_code.py
# or to skip Django ORM queries:
flake8 --max-expression-complexity=7 --ignore-django-orm-queries-complexity your_code.py

Verify before relying

  • How expression complexity is actually scored (the algorithm or heuristic used beyond the example shown).
  • Whether the Django ORM query exemption works reliably across common query patterns.
  • Performance impact on large codebases or deeply nested expressions.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
flake8
MaintenanceActively maintained 0 days since the last release
Last repo commit
First released
Downloads341,486 / month, #7,402 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.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: DocumentationTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance

Evidence: flake8_expression_complexity-0.1.1-py3-none-any.whl

Tags

Capabilities
flake8 expression complexity checkercode complexity linterexpression complexity analysisflake8 extensionpython code qualitydetect complex expressionsflake8 plugin
Topics
linterflake8-plugincode-quality
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 expression 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 flake8-annotations-complexity · flake8-cognitive-complexity · cognitive-complexity · mccabe · flake8-functions · xenon · flake8-noqa · wemake-python-styleguide · flake8-variables-names · flake8