autotyping
A tool for autoadding simple type annotations.
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you want to reduce boilerplate type annotation work and are willing to verify the results with a type checker. The low install friction and permissive license make it a low-risk experiment. However, the 690-day gap since the last release suggests limited active maintenance; use it as a helper tool rather than a critical part of your workflow, and always validate its output.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Heuristic-based inference may produce incorrect annotations; always verify with a type checker afterward.
- Low friction: pure Python wheel with only two runtime dependencies (libcst and typing-extensions).
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions.
last release 2024-09-23 (690 days) · last repo commit 2025-09-19 · 288 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 73,704 downloads/mo, #14,945 on PyPI
Alternatives
Verify before relying
pip install autotyping
python -m autotyping /path/to/code --safe
# Or as a libcst codemod:
python -m libcst.tool codemod autotyping.AutotypeCommand /path/to/code- Whether the tool's heuristics work reliably on large codebases or edge cases beyond the documented limitations.
- How well the --pyanalyze-report integration works in practice with current pyanalyze versions.
- Performance characteristics when run on very large code repositories.
What it is and what it does
Autotyping is a command-line tool and libcst codemod that automatically adds type annotations to Python code where they are obvious from context. It uses heuristics to infer types from function bodies (e.g., functions with no return statement get `-> None`), parameter defaults (e.g., `flag=True` becomes `flag: bool`), and magic method signatures. It supports multiple invocation modes: direct CLI, pre-commit hooks, or as a libcst codemod.
The tool offers granular flags for different annotation strategies—`--none-return`, `--bool-param`, `--scalar-return`, and others—plus shortcut flags like `--safe` (conservative changes) and `--aggressive` (riskier inference). It can also integrate with pyanalyze's type suggestions. The documentation explicitly warns that heuristics may fail and that you should run a type checker afterward to verify correctness.
Use it for
- Add `-> None` annotations to functions that don't return anything, eliminating tedious manual work.
- Annotate boolean, string, and numeric parameters based on their literal default values.
- Bulk-annotate magic methods like `__init__`, `__str__`, and `__len__` with their standard return types.
- Integrate into a pre-commit hook to enforce type annotations on every commit automatically.
- Use as a libcst codemod in a larger refactoring pipeline to seed a codebase with starter annotations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you want to reduce boilerplate type annotation work and are willing to verify the results with a type checker. The low install friction and permissive license make it a low-risk experiment. However, the 690-day gap since the last release suggests limited active maintenance; use it as a helper tool rather than a critical part of your workflow, and always validate its output.
Install
autotyping on PyPI
Before you install
Low friction: pure Python wheel with only two runtime dependencies (libcst and typing-extensions). Maintenance shows aging status—690 days since last release—but the repository remains active with recent commits and no archived status.
Requires Python 3.8 or later. Heuristic-based inference may produce incorrect annotations; always verify with a type checker afterward.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install autotyping
python -m autotyping /path/to/code --safe
# Or as a libcst codemod:
python -m libcst.tool codemod autotyping.AutotypeCommand /path/to/code
Verify before relying
- Whether the tool's heuristics work reliably on large codebases or edge cases beyond the documented limitations.
- How well the --pyanalyze-report integration works in practice with current pyanalyze versions.
- Performance characteristics when run on very large code repositories.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packageslibcsttyping-extensions |
| Maintenance | Aging 690 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 73,704 / month, #14,945 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development |
Evidence: autotyping-24.9.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 › “automatic type annotation”
- autotypingAutomatically infers and adds type annotations to Python functions…
- MonkeyTypeMonkeyType collects runtime types of function arguments and return…
- pytypePytype is a static type checker that infers types in Python code…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also code-annotations · MonkeyType · types-sqlalchemy-utils · flake8-annotations · typing-inspection · types-smorest · flake8-annotations-complexity · types-decorator · types-pysaml2 · libcst