Skip to content

Conversation

@asukaminato0721
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tuple Types in type hints are currently not clickable

2 participants