Skip to content

[ty] Fix semantic token classification for generic class members in annotations#23811

Merged
charliermarsh merged 1 commit intomainfrom
charlie/fix-highlight
Mar 9, 2026
Merged

[ty] Fix semantic token classification for generic class members in annotations#23811
charliermarsh merged 1 commit intomainfrom
charlie/fix-highlight

Conversation

@charliermarsh
Copy link
Member

Summary

This PR fixes semantic highlighting for dotted generic class names used in annotation positions, like os.PathLike and os.PathLike[str]. Annotated assignments now visit their annotation through the annotation-specific path.

Closes astral-sh/ty#2989.

@charliermarsh charliermarsh added the ty Multi-file analysis & type inference label Mar 8, 2026
@charliermarsh charliermarsh marked this pull request as ready for review March 8, 2026 18:04
@AlexWaygood AlexWaygood added the server Related to the LSP server label Mar 8, 2026
@AlexWaygood AlexWaygood removed their request for review March 8, 2026 18:13
@charliermarsh charliermarsh merged commit ae50ba3 into main Mar 9, 2026
49 checks passed
@charliermarsh charliermarsh deleted the charlie/fix-highlight branch March 9, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the LSP server ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic class accessed as a member in an annotation changes color if not specialized

4 participants