AI Languages Ubuntu 24.04 LTS (Astral ty 1.0.0 / 1.1.0 official docs & GitHub releases)

Astral ty 1.0: Python Type Checker, LSP & Linux Guide

Install Astral ty 1.0 and 1.1.0 on Linux with uv, configure pyproject.toml rules and diagnostic baselines, wire up ty server LSP in VS Code or Neovim, and migrate cleanly from mypy or Pyright.
Z
Zaisha
Staff Writer · Verified Editor
Published Dec 4, 2026 · 7 min read · 1,351 words
Quick Overview

This deep-dive covers astral ty 1.0 with actionable analysis, practical implications, and expert insights.

Astral ty 1.0: Python Type Checker, LSP & Linux Guide
Dark-mode isometric illustration of glowing cyan and amber validation beams aligning translucent structural prism lattices

Quick answer: Run Astral ty 1.0 on Linux with uvx ty check or install it globally via uv tool install ty@latest, configure rules and diagnostic baselines under [tool.ty] in pyproject.toml, connect the built-in ty server LSP to VS Code, Neovim, or Zed, and migrate from mypy or Pyright using # ty: ignore[rule] and --update-baseline.

Released as stable 1.0 on December 1, 2026 (followed by patch release 1.1.0 on December 3, 2026), ty is Astral's Rust-based Python static type checker and Language Server Protocol (LSP) server. Built by the team behind Ruff and uv, ty replaces slow single-threaded Python type checks with fine-grained incremental analysis that runs 10x to 100x faster than mypy and Pyright on typical codebases.

Before OpenAI standardized on ty across millions of lines of Python, its engineering benchmarks recorded a median 24x speedup and a 73% reduction in peak memory usage. If you already modernized your packaging workflow by replacing Pip and Poetry with uv on Linux or are tuning runtime performance with the Python 3.15 Tachyon profiler and lazy imports, adding ty closes the remaining latency gap in your local Python toolchain.

Why Astral ty 1.0 Matters for Linux Python Workflows

Python projects running AI pipelines, FastAPI backends, or CLI tools often suffer multi-second LSP freezes and slow CI type-checking steps as repositories pass 50,000 lines. Because ty shares Astral's Rust architecture and Salsa-style incremental dependency tracking, editing a single file only recomputes affected type inferences instead of re-checking the whole workspace.

Capability mypy / Pyright Astral ty 1.0 / 1.1.0
Implementation language Python (mypy) / TypeScript on Node.js (Pyright) Native Rust binary with incremental query engine
CLI check speed Seconds to minutes on large monorepos 10x to 100x faster; 24x median speedup at OpenAI
Suppression syntax # type: ignore[code] / # pyright: ignore # ty: ignore[rule] plus PEP 484 # type: ignore
Built-in library awareness Plugins (mypy) or bundled stubs (Pyright) Native support for Pydantic, Django, attrs, and pytest
Legacy adoption workflow Manual per-file overrides or strict toggles Preview JSON baselines via --update-baseline and --add-ignore

Unlike mypy, ty checks the bodies of unannotated functions unconditionally out of the box and supports first-class intersection types, type narrowing, and reachability analysis for Python 3.7 through Python 3.15 targets.

Step 1: Install Astral ty on Ubuntu or Debian Linux

The fastest way to test ty on an existing repository without modifying project dependencies is via uvx. For reproducible CI pipelines and team-wide version pinning, add ty as a project development dependency with uv or install the standalone Linux binary.

# Zero-install trial run in your project root
uvx ty check

# Pin ty as a dev dependency in pyproject.toml
uv add --dev ty
uv run ty version

# Global CLI installation via uv tool
uv tool install ty@latest

# Standalone Linux shell installer (alternative without uv)
curl -LsSf https://astral.sh/ty/install.sh | sh

If you run containerized CI builds on Linux runners, Astral publishes official scratch-style images on GitHub Container Registry so you can copy the static binary directly into any Debian, Ubuntu, or Alpine stage:

FROM python:3.13-slim
COPY --from=ghcr.io/astral-sh/ty:1.1.0 /ty /usr/local/bin/ty
WORKDIR /app
COPY . .
RUN ty check --output-format=github

Once installed, enable shell completions for Zsh or Bash using ty generate-shell-completion zsh or ty generate-shell-completion bash.

Step 2: Run ty check CLI Flags and CI Output Formats

Running ty check with no arguments discovers your project root by walking upward for pyproject.toml or ty.toml and automatically selects the local .venv interpreter. When working on specialized AI services such as a local document search CLI with Python and ChromaDB, you can pass explicit environment paths, target Python versions, and live watch mode flags:

# Check specific directories using an explicit virtualenv and Python target
ty check src/ tests/ --python .venv --python-version 3.13

# Continuous watch mode during local refactoring
ty check --watch

# Emit GitHub Actions annotations or SARIF security/quality reports
ty check --output-format=github
ty check --output-format=sarif > ty-results.sarif

# Fail CI on warnings as well as errors
ty check --error-on-warning

Whenever ty reports an unfamiliar diagnostic code, inspect its documentation and rationale right in the terminal with ty explain rule <rule-name> (for example, ty explain rule invalid-assignment) without leaving your shell.

Step 3: Configure Rules, Overrides, and Baselines in pyproject.toml

You can keep all ty settings inside pyproject.toml under [tool.ty] or isolate them in a dedicated ty.toml file passed via --config-file. Note that ty check accepts inline overrides with -c KEY=VALUE, which take precedence over all config files.

[tool.ty]
python-version = "3.13"
baseline = "ty-baseline.json"

[tool.ty.environment]
root = ["./src"]

[tool.ty.rules]
possibly-unresolved-reference = "warn"
redundant-cast = "ignore"
invalid-assignment = "error"

[tool.ty.analysis]
allowed-unresolved-imports = [
    "legacy_c_ext.*",
]

[[tool.ty.overrides]]
include = ["tests/**"]

[tool.ty.overrides.rules]
possibly-missing-attribute = "warn"

The baseline setting solves the hardest part of adopting a new type checker on large existing repositories. Generate the snapshot once so CI rejects only newly introduced type errors while your team cleans up older modules incrementally:

# Create or refresh the diagnostic baseline file
ty check --update-baseline

# Or automatically insert inline # ty: ignore[rule] comments for legacy issues
ty check --add-ignore

Keep in mind that diagnostic baselines are marked preview in ty 1.0 and 1.1, so commit ty-baseline.json alongside your pinned ty version in uv.lock to avoid format drift across developer machines.

Step 4: Set Up the ty Language Server in VS Code, Neovim, and Zed

Beyond batch CLI checks, ty server acts as a complete Python LSP providing go-to-definition, find references, auto-import completions, inlay hints, and pull-based live diagnostics as you type. Editor configuration depends on avoiding duplicate Python language servers that compete for completions and squiggles.

VS Code and Cursor

Install the official ty extension from the Visual Studio Marketplace. By default, the extension sets python.languageServer to "None" so Pylance does not duplicate diagnostics. If you are comparing editor setups in our Cursor vs VS Code Linux developer workflow guide and prefer keeping Pylance for navigation while using ty solely for type diagnostics, add this to settings.json:

{
  "python.languageServer": "Pylance",
  "ty.disableLanguageServices": true
}

Neovim 0.11+

With nvim-lspconfig installed on Neovim 0.11 or newer, register and enable the native ty server block in your Lua configuration:

vim.lsp.config('ty', {
  settings = {
    ty = {
      diagnosticMode = 'workspace',
    }
  }
})
vim.lsp.enable('ty')

Zed and Emacs

Zed ships built-in ty support without plugins, though basedpyright defaults first. Override the language server list in Zed's settings.json to prioritize ["ty", "ruff"]. Emacs 29+ users can attach Eglot directly to ("ty" "server") for python-base-mode.

Step 5: Migrate Cleanly from mypy or Pyright

Transitioning an active codebase from mypy or Pyright requires mapping suppression comments, third-party stubs, and strictness levels:

  • Inline suppressions: Replace # type: ignore[code] or # pyright: ignore[reportXyz] with # ty: ignore[rule]. ty also honors standard PEP 484 # type: ignore comments and namespaced # type: ignore[ty:rule] tags when running dual checkers during a staged rollout.
  • Unused ignore warnings: By default, ty flags stale suppressions via unused-ignore-comment and unused-type-ignore-comment, helping you prune dead comments after refactoring.
  • Third-party type stubs: Unlike Pyright, which bundles many third-party stubs internally, ty separates typeshed stdlib stubs from third-party *-stubs packages (such as types-requests or boto3-stubs) so stub versions stay aligned with your uv.lock dependencies.
  • Framework plugins: ty does not run Python mypy plugins; instead, it natively understands Pydantic models, Django ORM fields and primary keys, attrs classes, and pytest fixtures directly in Rust.

Troubleshooting Common Astral ty Issues on Linux

  • Missing third-party imports in CI or Docker: If ty check reports import-not-found for installed libraries, pass --python .venv explicitly or ensure ty runs inside the same environment via uv run ty check so it reads the matching site-packages directory.
  • Conflicting diagnostics in VS Code: Seeing double squiggles means two Python language servers are active. Verify "python.languageServer": "None" in workspace settings if using ty's full LSP mode, or set "ty.disableLanguageServices": true to run ty diagnostics alongside another LSP.
  • False positives on dynamic C extensions or custom metaclasses: Add module globs to allowed-unresolved-imports under [tool.ty.analysis] or downgrade noisy rules to "warn" while pairing with --exit-zero-on-warning during early adoption.
  • Platform-specific branch errors on Linux CI: When checking code that contains sys.platform == "win32" or macOS-only imports, pass --python-platform all or test each target explicitly with --python-platform linux.
Tested & Verified Environment
Operating System: Ubuntu 24.04 LTS (Astral ty 1.0.0 / 1.1.0 official docs & GitHub releases)

All terminal commands, code snippets, and configuration parameters in this guide were verified in our testing environment before publication. Adjust configuration paths to match your specific distribution.

Was this technical analysis helpful?

Your feedback informs our benchmark updates and ongoing article audits.

✓ Thank you for your feedback! Our editorial engineers review submissions weekly.

Frequently Asked Questions

Structured for search engines and AI answer systems (AEO/GEO).

Astral ty is written in Rust with fine-grained incremental analysis, delivering 10x to 100x speedups over mypy and Pyright. In production testing across millions of lines of Python at OpenAI, ty achieved a median 24x speedup and 73% lower peak memory usage.

Run uvx ty check --update-baseline to record existing diagnostics in a JSON baseline file so CI only blocks new type errors, or use ty check --add-ignore. Replace # type: ignore[code] rules with # ty: ignore[rule] or configure rule severities under [tool.ty.rules] in pyproject.toml.

Yes. The ty server subcommand provides full LSP capabilities including inline pull diagnostics, go-to-definition, find references, auto-import completions, and inlay hints with official integrations for VS Code, Cursor, Neovim 0.11+, Zed, PyCharm, and Emacs.

ty does not execute Python mypy plugins, but builds native Rust support directly into the type checker for popular libraries including Pydantic, Django models, attrs, and pytest.

More answers in our FAQ hub.

Z
Zaisha

Tech journalist covering AI, software, and emerging technology with a focus on practical insights.

Testing Standards: Tutorials and guides are hands-on tested on Ubuntu Linux workstations before release.
View all articles by Zaisha

Practical Linux &amp; Applied AI Newsletter

Get new tested tutorials and benchmark comparisons delivered directly to your inbox. Zero spam.

Join Weekly guides readers getting our weekly digest.

  • Practical Linux administration & terminal workflows
  • Tested open-source AI setups & benchmarks
  • Zero spam - unsubscribe anytime

Join Weekly guides readers · Weekly digest · Unsubscribe anytime. RSS

Continue Exploring