# dropbox/pyannotate

Auto-generate PEP-484 annotations

Repository: https://github.com/dropbox/pyannotate
Canonical: https://ross.abutalabs.com/products/pyannotate
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2026-07-06T01:32:52+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 91, release rhythm 35, longevity 100
- inputs: {"age_days": 3215, "days_push": 59, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1442, forks 60 (observed 2026-08-28T04:04:44.698791+00:00)

## What it is
PyAnnotate auto-generates PEP-484 type annotations for Python code by collecting argument and return types observed at runtime, then inserting them into source files. It consists of a runtime collection module and a CLI tool that applies the inferred annotations as inline Python 3 annotations or Python 2 style type comments.

## Use cases
- add type hints to an untyped Python codebase automatically
- generate PEP-484 annotations from runtime call data
- prepare a legacy project for mypy checking
- collect observed argument and return types during pytest runs
- insert type comments into Python 2 code

## When to choose
- you want to bootstrap type annotations for a large untyped Python project
- you already run tests and can observe real call types at runtime
- you plan to adopt mypy and want a starting point for annotations

## When to avoid
- you want fully accurate static type inference without running code
- your code paths are not exercised by tests, so few types are observed
- you need annotations maintained continuously rather than generated once

## Facets
- artifact type: library
- maturity: maintenance
- function: type-system, developer-tools, cli
- domain: developer-tools, programming-languages, testing
- platform: python, cli, cross-platform
- tags: type-annotations, pep-484, mypy, runtime-type-collection, code-annotation

## Member repositories
- dropbox/pyannotate (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.698791+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:23.977148+00:00, confidence not recorded.
  - readme: https://github.com/dropbox/pyannotate (fetched 2026-08-28T04:04:44.698791+00:00, sha c5850b578e6b)
  - registry_pypi: https://pypi.org/pypi/pyannotate/json (fetched 2026-08-29T11:46:30.095111+00:00, sha 31ef565b8868)
- Data as of 2026-08-30T08:39:29.467469+00:00.
