$npx skillfedfor your agent

flake8-annotations-complexity

A flake8 extension that checks for type annotations complexity

Worth itPyPI Python ModulesReleased Aug 2026332.8K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

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

Yes. The plugin is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and adds minimal install friction (only flake8 as a dependency). It solves a real code-quality problem—catching overly complex type annotations—and integrates seamlessly into existing flake8 workflows. Install it if your team values readable, maintainable type hints.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; flake8 must be installed and configured.
  • Low friction: pure Python wheel with only flake8 as a runtime dependency.
  • Actively maintained as of 2026-08-14 with no known vulnerabilities.

License · maintenance · safety

MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.

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

0 known vulnerabilities (OSV.dev, 2026-08-14) · 332,768 downloads/mo, #7,505 on PyPI

Verify before relying

pip install flake8-annotations-complexity

# In your flake8 config or command line:
flake8 --max-annotations-complexity=3 --max-annotations-len=7 mycode.py

# Reports TAE002 (nesting too deep) and TAE003 (too many elements)
  • Whether the plugin integrates seamlessly with existing flake8 configurations and CI/CD pipelines.
  • Performance impact on large codebases with many type annotations.
Same gist for agents: .md · .json

What it is and what it does

flake8-annotations-complexity is a flake8 extension that measures and enforces limits on type annotation complexity. It defines complexity as the maximum nesting level of type brackets—for example, `List[int]` has complexity 2, while `Tuple[List[Optional[str]], int]` has complexity 4. The plugin checks annotations on function arguments (positional, keyword-only, *args, **kwargs), return types (including async functions), and annotated variable assignments.

The plugin provides two checks: TAE002 flags annotations exceeding a nesting-depth threshold (default 3), and TAE003 flags annotations with too many elements (default 7). Both thresholds are configurable via flake8 command-line options. It runs on Python 3.10 through 3.14 and integrates directly into your existing flake8 workflow, making it easy to catch overly complex type hints during development or CI.

Use it for

  • Enforce a team style guide that discourages deeply nested generics like `Dict[str, List[Tuple[int, Optional[str]]]]` in code review.
  • Catch annotation mistakes early—complex annotations often signal bad decomposition or wrong data structure choices.
  • Improve code readability by flagging annotations that are hard to parse at a glance.
  • Prevent Java-like verbosity in Python type hints during refactoring or new feature development.
  • Integrate into CI/CD pipelines to maintain consistent annotation standards across a project.

Worth the install?

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

Worth it

Yes.

The plugin is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and adds minimal install friction (only flake8 as a dependency). It solves a real code-quality problem—catching overly complex type annotations—and integrates seamlessly into existing flake8 workflows. Install it if your team values readable, maintainable type hints.

Install

flake8-annotations-complexity on PyPI

Before you install

Low friction: pure Python wheel with only flake8 as a runtime dependency. Actively maintained as of 2026-08-14 with no known vulnerabilities.

Requires Python 3.10 or later; flake8 must be installed and configured.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.

Quickstart

pip install flake8-annotations-complexity

# In your flake8 config or command line:
flake8 --max-annotations-complexity=3 --max-annotations-len=7 mycode.py

# Reports TAE002 (nesting too deep) and TAE003 (too many elements)

Verify before relying

  • Whether the plugin integrates seamlessly with existing flake8 configurations and CI/CD pipelines.
  • Performance impact on large codebases with many type annotations.

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
Downloads332,768 / month, #7,505 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 :: OnlyProgramming 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_annotations_complexity-0.2.0-py3-none-any.whl

Tags

Capabilities
flake8 type annotation complexitycheck annotation nesting depthenforce simpler type hintsannotation length linterreduce annotation complexityflake8 annotation checkertype hint quality tool
Topics
lintingtype-hintscode-quality
PyPI keywords
annotationsflake8

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 type annotation 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-class-attributes-order · flake8-expression-complexity · flake8-functions · flake8-cognitive-complexity · cognitive-complexity · code-annotations · flake8-type-checking · flake8-annotations · mccabe · flake8-variables-names