Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Avoid crash when hovering over Callable#25759

Merged
charliermarsh merged 1 commit into
mainfrom
charlie/fix-callable-hover-crash
Jun 9, 2026
Merged

[ty] Avoid crash when hovering over Callable#25759
charliermarsh merged 1 commit into
mainfrom
charlie/fix-callable-hover-crash

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Summary

When resolving qualifiers for an imported name, use the resolved definition's file to interpret its AST-backed definition kind. Previously, hover combined a definition from typeshed with the importing module's AST, which could panic for typing.Callable and collections.abc.Callable.

Add regression coverage for both imports.

Closes astral-sh/ty#3698.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 8, 2026
@charliermarsh charliermarsh added the server Related to the LSP server label Jun 8, 2026
@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 92.23%. The percentage of expected errors that received a diagnostic held steady at 87.42%. The number of fully passing files held steady at 92/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@charliermarsh charliermarsh marked this pull request as ready for review June 9, 2026 00:02
@charliermarsh charliermarsh added the bug Something isn't working label Jun 9, 2026
@astral-sh-bot astral-sh-bot Bot requested a review from MichaReiser June 9, 2026 00:03
@astral-sh-bot

astral-sh-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@charliermarsh charliermarsh merged commit 2054235 into main Jun 9, 2026
59 checks passed
@charliermarsh charliermarsh deleted the charlie/fix-callable-hover-crash branch June 9, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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.

Crash on hovering any usage of collections.abc.Callable

3 participants