Closes#3266.
This updates our typing-features and typing-faq docs to account for
recent changes in ty's behavior. Both the "gradual guarantee" and
"fixpoint iteration" sections no longer describe our actual behavior. In
both cases, I tried different ways to update the section, but ended up
feeling like there was nothing that distinctive or interesting to say,
so I just removed the sections entirely.
For gradual guarantee, I don't think we should have a section with that
name, since in general we don't take that as a guiding principle
anymore. The remaining singleton case is very niche, and already
discussed in the FAQ.
For fixpoint iteration, we still do that of course, but for performance
reasons we have since decided to promote literal unions much more
quickly in all cyclic cases. So I wasn't able to construct any realistic
case anymore where this "union of literals up to some limit" behavior is
visible.
## Summary
Add content tabs in the documentation, showing both `pyproject.toml` and
`ty.toml` variants. Same as in Ty's or Ruff’s documentation. Previously
only `pyproject.toml` was shown, which might lead people to think that
only this file is supported.
## Test Plan
Manual testing building the docs locally.
## Summary
Now that we do not union in `Unknown` into element types of invariant
collections anymore, this question comes up more frequently. I'm taking
a first stab at trying to explain this in a concise way. I am also
planning to add a diagnostic hint that would be emitted in those
situations, which could refer to this FAQ entry.
I think it's a little tricky to show a meaningful screenshot for this,
so I left it out. We could do a video, but nothing else on this page
uses a video so I opted not to do it.
## Summary
This just adds a link in the documentation to the corresponding to the
issue tracking call hierarchy feature (#1976 )
## Test Plan
The precommit hook passes, and when previewing the doc locally the
change appears correct (and this is only a change to documentation).
## Summary
Continuation of https://github.com/astral-sh/ty/pull/2762. This PR
clarifies that nvim-lspconfig is recommended for any version of Neovim
and lists the configuration for Neovim >=0.11 first since nvim-lspconfig
support for Neovim <0.11 is being deprecated.
---------
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Andrew Gallant <jamslam@gmail.com>
Co-authored-by: Andrew Gallant <andrew@astral.sh>
## Summary
This PR corrects the HTML `<src=...>` attributes in `index.md` such that
they point to the right SVG files.
Note:
1. There is a bar chart on the docs home page
<https://docs.astral.sh/ty/>.
2. There are two SVG files and we choose which one to display depending
on the theme (light or dark).
3. We currently get:
1. `ty-benchmark-cli.svg`, if we use the light theme. This has light
writing, which cannot be seen against the light theme background.
2. `ty-benchmark-cli-dark.svg`, if we use the dark theme. This does not
exist.
4. This PR changes these links so that we use
`ty-benchmark-cli-light.svg` for the light theme and
`ty-benchmark-cli.svg` for the dark theme. Both of these images already
existed.
## Test Plan
We manually compare the before and after appearance of the docs site.
### Light
| before | after |
| - | - |
| <img width="775" height="300" alt="Screenshot 2026-01-12 at 10 17 27"
src="https://github.com/user-attachments/assets/da3854d2-49fd-4a93-980b-2fd43c059155"
/> | <img width="736" height="390" alt="Screenshot 2026-01-12 at 10 21
47"
src="https://github.com/user-attachments/assets/35ae397f-163a-411d-9470-da1a727eb261"
/> |
### Dark
| before | after |
| - | - |
| <img width="775" height="300" alt="Screenshot 2026-01-12 at 10 17 19"
src="https://github.com/user-attachments/assets/48f0f19a-e57b-4b64-89d0-08bad5bcef60"
/> | <img width="775" height="300" alt="Screenshot 2026-01-12 at 10 21
43"
src="https://github.com/user-attachments/assets/f6c2388b-acfa-4ff1-92fd-2428c9e80d84"
/> |
## To the reviewer
The `CONTRIBUTING.md` guidelines recommend running
```shell
npx prettier --prose-wrap always --write "**/*.md"
```
after editing any markdown files. However, this changes 24 files, not
only `index.md`. Should I run this as a separate commit, a separate PR
or neither?
<!--
Thank you for contributing to ty! To help us out with reviewing, please
consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
https://github.com/astral-sh/ty?tab=readme-ov-file#how-should-i-stylize-ty
states that we should use "ty" rather than "Ty".