Skip to content

fix hover on named parameter is missing info #3238#4054

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3238
Open

fix hover on named parameter is missing info #3238#4054
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3238

Conversation

@asukaminato0721

@asukaminato0721 asukaminato0721 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3238

Now keyword-argument hover can resolve parameter types from the defining module, not just the caller module,
fall back to the selected call signature when definition refinement is unavailable.

Test Plan

add a test && update a todo

@meta-cla meta-cla Bot added the cla signed label Jul 5, 2026
@github-actions github-actions Bot added the size/m label Jul 5, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot added size/m and removed size/m labels Jul 5, 2026
@github-actions

This comment has been minimized.

@NathanTempest

NathanTempest commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Thanks @asukaminato0721 !

The new hover_shows_type_for_imported_keyword_argument test and the kwarg_with_overload improvement (None → int) are great.

One blocker before this can land. The keyword-argument hover resolution in state/lsp.rs was refactored on main since you branched, it now goes through classify_surface → keyword_argument_key → ResolutionKind rather than the direct find_definition_for_keyword_argument().first().and_then(...) match arm this patch edits, so the main hunk no longer applies. Could you rebase onto latest main and re-express the fix on the new structure?

Also: keyword_argument_key is where the definition Key should be resolved against the defining module's handle, and the call-signature fallback can hang off the KeywordArgument handling. The get_expected_type_at → get_active_call_argument_type_for_surface extraction still applies cleanly and is a nice cleanup to keep.

@NathanTempest NathanTempest self-assigned this Jul 14, 2026
@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

hover on named parameter is missing info

2 participants