ruff/crates/ty/tests/cli
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
..
config_option.rs [ty] Remove 'pre-release software' warning (#20817) 2025-10-13 19:50:19 +02:00
exit_code.rs [ty] Improve diagnostic range for non-subscriptable diagnostics (#21461) 2025-11-14 21:15:14 +00:00
file_selection.rs [ty] Fix --exclude and src.exclude merging (#21341) 2025-11-10 12:52:45 +01:00
main.rs [ty] Improve diagnostic range for non-subscriptable diagnostics (#21461) 2025-11-14 21:15:14 +00:00
python_environment.rs [ty] remove erroneous canonicalize (#21405) 2025-11-12 15:47:33 -05:00
rule_selection.rs [ty] Add suggestion to unknown rule diagnostics, rename unknown-rule lint to ignore-comment-unknown-rule (#20948) 2025-10-18 12:44:21 +02:00