Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>TypifyNew to Visual Studio Code? Get it now.
Typify

Typify

Hassan Aman

|
6 installs
| (0) | Free
Interactive type inference tool powered by the Typify engine.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Typify

License: MIT API Status

Typify is a usage-driven Python type inference system that automatically infers types for unannotated Python codebases.

The project consists of two parts:

  • typify-cli - the standalone inference engine and CLI powering the extension
  • Typify VS Code Extension - interactive editor integration with live inferred types, hover cards, and one-click annotation

Motivation

Python is one of the most widely used programming languages in the world, yet the vast majority of real-world Python code remains unannotated. Studies show that fewer than 10% of annotatable code elements carry explicit type annotations. This creates real problems for developers: without type information, IDEs cannot offer reliable autocompletion, refactoring tools operate blindly, and entire classes of bugs go undetected until runtime.

Without annotations With annotations
Unannotated function Annotated function in IDE

Adding annotations manually is tedious and error-prone, especially in large or legacy codebases. The goal of Typify is to automate this process, recovering precise type information across an entire project without requiring developers to write a single annotation by hand.


Approach

Typify is a purely static type inference engine. It builds a dependency graph of the entire project, schedules modules in topological order, and propagates type information across functions, classes, and module boundaries using iterative fixpoint analysis.

typify-pipeline

The core insight is usage-driven inference: types are inferred not from declarations, but from how variables and functions are actually used throughout the codebase.

Example

Consider a function with no annotations:

def add(x, y):
    return x + y

Somewhere else in the project, it is called like this:

add(10, "hello")

Existing tools treat each function in isolation and cannot infer anything about x or y without explicit annotations. Typify traces the call site, observes that 10 is an int and "hello" is a str, and propagates these types back to the parameters, inferring x: int and y: str without any annotations.

This call-site propagation works recursively and cross-module, meaning types flow naturally through the entire project as Typify analyzes it.

Unlike local-only inference tools, Typify uses a whole-project usage-driven analysis. It tracks how values flow across files and function calls, allowing it to infer precise types such as:

list[dict[str, list[str]]]

instead of broad approximations like list or Any.


Evaluation

Typify was evaluated on two benchmark datasets, ManyTypes4Py and Typilus, against static checkers (Pyright, Pyre Infer), a deep learning model (Type4Py), and the state-of-the-art hybrid system (HiTyper).

Key findings:

  • Typify substantially outperforms all static checkers, with exact-match accuracy up to 55.9% overall on ManyTypes4Py vs. Pyre Infer's 10.4%.
  • Typify closely trails HiTyper despite using no machine learning, running at 4.7 ms per data point vs. HiTyper's 48.2 ms, a 90% reduction in latency.
  • When combined with Type4Py, Typify outperforms HiTyper across nearly all tasks and datasets.

Feature Comparison

Tool No annotations needed Usage-driven inference Cross-module / whole-project Deterministic & reproducible ML-based predictions
Pyright ✕ ✕ ✓ ✓ ✕
Pyre ✕ ✕ ✕ ✓ ✕
Type4Py ✓ ✕ ✕ ✕ ✓
HiTyper ✓ ✕ ✕ ✕ ✓
Typify ✓ ✓ ✓ ✓ ✓

As shown above, Typify stands out because it combines analysis of the entire project with predictable execution, while also supporting optional ML features. Unlike many existing tools, it does not focus on just one strength at the expense of others.


Visual Studio Code Extension

The VS Code extension brings Typify directly into your editor. Open a Python project and Typify automatically analyzes your code in the background, showing inferred types on hover and letting you insert annotations into your source with a single click.

Requirements

  • VS Code 1.85 or higher

Typify sets itself up automatically on first launch. No extra installs are required.


Installation

From inside VS Code

  1. Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac)
  2. Search for Typify
  3. Click Install
Typify in the VS Code Extensions panel

From the Marketplace

Typify is also available on the Visual Studio Code Marketplace.

Typify on the VS Code Marketplace

Simply copy the command, head over to VS Code, press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the command palette and paste and hit enter.

Typify on the VS Code Marketplace

Once installed, Typify activates automatically whenever you open a Python file. On the first run it creates a small isolated Python environment in the background. This only happens once.


Features

Live Type Inference

Typify continuously analyzes your project and infers:

  • Variable types
  • Function parameter types
  • Function return types

The analysis updates automatically about one second after you stop typing, no save or manual run required.


Hover Cards

Hover over any variable, parameter, function, or class to see:

  • Inferred type information
  • Full inferred function signatures
  • Call sites across the project
  • Scope information
  • Definition locations
Hovering over an unannotated function showing inferred types and call sites

One-Click Annotation

When Typify infers a type, an Annotate button appears in the hover card.

Clicking it inserts the annotation directly into your source code.

Supported annotations include:

  • Function parameters
  • Return types
  • Variables
The same function now annotated after clicking Annotate

You can also annotate from the Command Palette using:

Typify: Annotate Symbol

Status Bar

The bottom-right status indicator shows Typify's current state:

Appearance Meaning
○ Typify Idle
↻ Typify Analysis running
✓ Typify Analysis complete
✕ Typify Error

Clicking the status item opens the Typify sidebar.

The Typify sidebar panel

Sidebar Panel

The Typify sidebar provides:

  • Analyzer status
  • Pause/resume controls
  • Configuration options
The Typify sidebar panel

Optional inference modes can be enabled individually or together:

Context Retrieval

Uses a retrieval index of annotated Python code to suggest types for unresolved symbols based on contextual similarity.

Useful for functions or variables with little or no usage evidence.

Augment Context (experimental)

Improves retrieval quality by incorporating additional surrounding project context into retrieval queries.

Type4Py Neural Model

Integrates the Type4Py deep-learning model as a fallback inference source for low-confidence slots.

This supplements, rather than replaces, Typify's usage-driven analysis.


Commands

Available from the Command Palette:

Command Description
Typify: Show Panel Open the Typify sidebar
Typify: Re-analyze Project Run a fresh analysis
Typify: Annotate Symbol Insert annotation for the last hovered symbol

Tips

  • No manual saves are required
  • New Python files are detected automatically
  • Deleted files are removed automatically
  • Use Re-analyze Project if results appear stale
  • Combining all optional modes gives the highest coverage

Links

  • VS Code Marketplace
  • VS Code Extension Repository
  • Typify Backend Repository
  • Type4Py
  • ICPC 2026 Paper

The full technical paper containing the technique description and evaluation results was published at the 34th IEEE/ACM International Conference on Program Comprehension (ICPC 2026), Rio de Janeiro, Brazil.

Typify is a research project from the University of Windsor, supported by the Natural Sciences and Engineering Research Council of Canada (NSERC).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft