Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

ty extension for Visual Studio Code

image image Actions status

A Visual Studio Code extension for ty, an extremely fast Python type checker and language server, written in Rust.

The extension ships with ty==0.0.94.

Installation

Install this extension from the Visual Studio Marketplace.

Features

Currently, the extension supports the following features:

Usage

Once installed in Visual Studio Code, ty will automatically execute when you open or edit a Python or Jupyter Notebook file.

The extension automatically disables the language server from the Python extension to avoid running two Python language servers. This is done by setting python.languageServer to "None" as a default configuration.

If you prefer to use ty only for type checking and want to use another language server for capabilities like hover, auto-completions, etc., you can override this by explicitly setting python.languageServer and ty.disableLanguageServices in your settings.json:

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

If you don't want to use ty for a specific workspace, disable this extension in VS code.

Untrusted Workspace

The extension supports untrusted workspace. For untrusted workspaces, the extension always uses the bundled ty executable and disables uv integration, ignoring the following settings:

Settings

See the ty editor settings reference for an enumeration of all supported settings.

Commands

CommandDescription
ty: Restart serverRestart the ty language server
ty: Show client logsOpen the "ty" output channel
ty: Show server logsOpen the "ty Language Server" output channel
ty: Open debug informationOpens a window with debug information

Requirements

The ty extension works without additional extensions. For Python environment detection, we recommend one of the following:

When either extension is available, ty can find an executable installed in the active Python environment. You can also set ty.interpreter to a Python executable or environment directory without either extension. When no interpreter is configured or selected, ty looks for an executable in the Python environment configured by environment.python or a local .venv. If no executable is found, the extension checks PATH before using its bundled ty executable.

Reload VS Code after installing or enabling either extension.

Finding a ty executable through a Python interpreter requires Python 3.8 or later. ty itself can analyze Python 3.8 to 3.14.

Getting help

See the troubleshooting guide to get more information on how to debug issues with the extension or the language server.

Publisher

This extension is published under the astral-sh account, which differs from our Ruff extension that uses the "charliermarsh" publisher. Both extensions are official products from Astral.

License

The ty extension is licensed under the MIT license (LICENSE).

关于 About

A Visual Studio Code extension for ty.

语言 Languages

TypeScript82.5%
Python15.4%
JavaScript2.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
338
Total Commits
峰值: 27次/周
Less
More

核心贡献者 Contributors