ruff/crates/ty
Alex Waygood d63b4b0383
[ty] Improve diagnostic range for non-subscriptable diagnostics (#21461)
## Summary

Currently our diagnostic only covers the range of the thing being
subscripted:

<img width="1702" height="312" alt="image"
src="https://github.com/user-attachments/assets/7e630431-e846-46ca-93c1-139f11aaba11"
/>

But it should probably cover the _whole_ subscript expression (arguably
the more "incorrect" bit is the `["foo"]` part of this expression, not
the `x` part of this expression!)

## Test Plan

Added a snapshot

Co-authored-by: Brent Westbrook
<36778786+ntBre@users.noreply.github.com>
2025-11-14 21:15:14 +00:00
..
docs [ty] implement typing.NewType by adding Type::NewTypeInstance 2025-11-10 14:55:47 -08:00
src [ruff+ty] Add colour to --help (#21337) 2025-11-08 17:17:14 +01:00
tests [ty] Improve diagnostic range for non-subscriptable diagnostics (#21461) 2025-11-14 21:15:14 +00:00
build.rs [ty] Fix server version (#19284) 2025-07-14 09:06:34 +02:00
Cargo.toml [ty] Support LSP client settings (#19614) 2025-08-06 18:37:21 +05:30
CONTRIBUTING.md Fix link typo in ty's CONTRIBUTING.md (#18923) 2025-06-24 20:23:31 +00:00
README.md [ty] contribution guide (#18061) 2025-05-13 10:55:01 +02:00

ty

ty is an extremely fast type checker. Currently, it is a work-in-progress and not ready for production use.

The Rust code for ty lives in this repository; see CONTRIBUTING.md for more information on contributing to ty.

See the ty repo for ty documentation and releases.