{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/13"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/3"},{"label":"Documentation","url":"https://skillfed.io/packages/category/software-development-documentation"}],"enrichment":{"capability":"A flake8 plugin that flags type annotations exceeding configurable complexity thresholds, measuring nesting depth and element count to encourage simpler, more readable type hints.","skillfed_tags":["linting","type-hints","code-quality"],"use_cases":["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\u2014complex 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."],"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\u2014for 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.\n\nThe 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.","worth_installing":"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\u2014catching overly complex type annotations\u2014and integrates seamlessly into existing flake8 workflows. Install it if your team values readable, maintainable type hints."},"id":"flake8-annotations-complexity","links":{"html":"https://skillfed.io/packages/flake8-annotations-complexity","md":"https://skillfed.io/packages/flake8-annotations-complexity.md","pypi":"https://pypi.org/project/flake8-annotations-complexity/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-14","license_spdx":"MIT","license_treatment":"permissive","name":"flake8-annotations-complexity","python_support":"supports_current","summary":"A flake8 extension that checks for type annotations complexity"},"popularity":{"monthly_downloads":332768,"position":7505,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.2.0"}
