Small documentation improvements (#1606)
Some checks failed
CI / python package (push) Has been cancelled
CI / pre-commit (push) Has been cancelled
CI / Check generated files unedited (push) Has been cancelled
CI / mkdocs (push) Has been cancelled

This commit is contained in:
Micha Reiser 2025-11-21 10:24:10 +01:00 committed by GitHub
parent 72ed4e7ec7
commit 7a6b79d37e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 8 deletions

View file

@ -6,13 +6,6 @@
An extremely fast Python type checker and language server, written in Rust.
> [!WARNING]
>
> ty is in preview and is not ready for production use.
>
> We're working hard to make ty stable and feature-complete, but until then, expect to encounter bugs,
> missing features, and fatal errors.
## Getting started
Try out the [online playground](https://play.ty.dev), or run ty with

View file

@ -8,7 +8,14 @@ The Astral team maintains an official VS Code extension.
Install the [ty extension](https://marketplace.visualstudio.com/items?itemName=astral-sh.ty) from the VS Code Marketplace.
See the extension's [README](https://github.com/astral-sh/ty-vscode) for more details on usage.
Then disable the language server from the [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) by adding the
following [setting](https://code.visualstudio.com/docs/python/settings-reference#_intellisense-engine-settings) to your `settings.json` to avoid running two language servers:
```json
{
"python.languageServer": "None"
}
```
## Neovim
@ -110,5 +117,7 @@ ty server
Refer to your editor's documentation to learn how to connect to an LSP server.
## Customize your experience
See the [editor settings](./reference/editor-settings.md) for more details on configuring the language
server.

View file

@ -60,6 +60,20 @@ even when `type: ignore[code]` is used.
add_three("one", 5) # type: ignore
```
## Multiple suppressions comments
To suppress a typing error on a line that already has a suppression comment from another tool,
add the `# ty: ignore` comment to the same line.
For example, to suppress a type error and disable formatting for a specific line:
```python
result = calculate() # ty: ignore[invalid-argument-type] # fmt: skip
# or
result = calculate() # fmt: off # ty: ignore[invalid-argument-type]
```
## Unused suppression comments
If the [`unused-ignore-comment`](./reference/rules.md#unused-ignore-comment) rule is enabled, ty