flake8-annotations
Flake8 Type Annotation Checks
Decision gist · record as of 2026-08-14
Yes. The plugin is actively maintained, has no known vulnerabilities, integrates seamlessly into Flake8 workflows with low install friction, and solves a real problem—enforcing annotation discipline—that static type checkers alone do not address. The MIT license imposes no restrictions. Install it if your team wants to mandate or gradually adopt type annotations.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; flake8 must already be installed.
- Low friction: pure Python wheel with only flake8 as a runtime dependency.
- Actively maintained with a recent commit on 2026-07-10 and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with minimal obligations.
last release 2025-10-09 (309 days) · last repo commit 2026-07-10 · 165 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 693,250 downloads/mo, #5,317 on PyPI
Alternatives
Verify before relying
pip install flake8-annotations
# Then run flake8 normally; the plugin activates automatically
flake8 your_code.py
# Verify it's loaded
flake8 --version- Whether the plugin's performance scales acceptably on large codebases with thousands of functions.
- How well the opinionated warnings (ANN401, ANN402) integrate with existing type-checking workflows beyond flake8.
What it is and what it does
flake8-annotations is a Flake8 plugin that scans Python function definitions and reports missing type annotations according to PEP 3107. It detects absent annotations on function parameters (including *args and **kwargs), method self/cls arguments, and return types across public, protected, and special methods. The plugin integrates directly into Flake8's linting pipeline and runs automatically once installed.
The plugin does not replace static type checkers like mypy, does not validate type comments or variable annotations, and does not read stub files. It offers configurable warnings with sensible defaults—most checks enabled by default, opinionated checks (like disallowing typing.Any) disabled by default. Configuration options allow suppressing errors for functions without returns, dummy arguments, untyped nested functions, and functions decorated with dispatch or overload decorators.
Use it for
- Enforce consistent annotation practices across a team's codebase by failing CI when functions lack type hints.
- Gradually migrate an unannotated legacy codebase toward full type coverage by identifying all missing annotations in one pass.
- Catch untyped *args and **kwargs in function signatures before they cause type-checking issues downstream.
- Suppress annotation requirements for dispatch functions (singledispatch, singledispatchmethod) that intentionally omit hints on the base implementation.
- Detect missing return type hints on public APIs to improve IDE autocomplete and documentation generation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The plugin is actively maintained, has no known vulnerabilities, integrates seamlessly into Flake8 workflows with low install friction, and solves a real problem—enforcing annotation discipline—that static type checkers alone do not address. The MIT license imposes no restrictions. Install it if your team wants to mandate or gradually adopt type annotations.
Install
flake8-annotations on PyPI
Before you install
Low friction: pure Python wheel with only flake8 as a runtime dependency. Actively maintained with a recent commit on 2026-07-10 and no known vulnerabilities.
Requires Python 3.10 or later; flake8 must already be installed.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with minimal obligations.
Quickstart
pip install flake8-annotations
# Then run flake8 normally; the plugin activates automatically
flake8 your_code.py
# Verify it's loaded
flake8 --version
Verify before relying
- Whether the plugin's performance scales acceptably on large codebases with thousands of functions.
- How well the opinionated warnings (ANN401, ANN402) integrate with existing type-checking workflows beyond flake8.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageflake8 |
| Maintenance | Actively maintained 309 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 693,250 / month, #5,317 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 6 - MatureEnvironment :: ConsoleFramework :: Flake8Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming 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 :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTyping :: Typed |
Evidence: flake8_annotations-3.2.0-py3-none-any.whl
Tags
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 › “enforce function type hints”
- flake8-annotationsA Flake8 plugin that enforces PEP 3107-style function type…
- beartypeBeartype is a runtime type checker that validates Python type hints…
- type-enforcedEnforces Python type annotations at runtime using decorators,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
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.
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.
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.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
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…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pep8-naming · flake8-unused-arguments · flake8-pyi · flake8-type-checking · flake8-pep585 · flake8 · flake8-typing-imports · typeguard · code-annotations · flake8-annotations-complexity