fix Tuple Types in type hints are currently not clickable #1680 #1683
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1680
TypeDisplayContext now tracks an optional tuple QName, exposes new_with_tuple, and Type gained get_types_with_locations_with_stdlib, so callers with a stdlib can request clickable tuple bases while legacy callers stay untouched.
The formatting stack gained TypeOutput::write_tuple_keyword, Tuple::fmt_with_type now routes through it, and OutputWithLocations injects the tuple location when available, giving us localized spans without changing the rendered text.
The inlay-hint provider fetches the stdlib once per request and uses the new helper so tuple keywords inside hints are now cmd+clickable.
Test Plan
cargo test -p pyrefly_types type_output::tests::test_output_with_locations_tuple_base_clickable_when_qname_available
cargo test -p pyrefly_types display::tests::test_get_types_with_location_tuple.