Skip to content

Fix, On Hover Docstring for Function Overloads - #5695

Open
dibrinsofor wants to merge 7 commits into
pyrefly-org:mainfrom
dibrinsofor:lsp-blame
Open

dibrinsofor wants to merge 7 commits into
pyrefly-org:mainfrom
dibrinsofor:lsp-blame

Conversation

@dibrinsofor

Copy link
Copy Markdown

Summary

Fixes #5647

Fix to track docstrings for overloaded functions and bounded methods on hover.

  • Uses the declaration from overload resolution to find the relevant docstring.

  • An earlier iteration attempted matching overload list by index, but that did not scale to meet bounded class methods.

  • Undocumented overloads fall back only to the overload implementation's docstring.

  • I am a human, and I fully understand the code I am submitting.

Test Plan

Tested hover coverage for overloaded functions and bounded class methods in .../test/lsp/hover.rs for int and str, and a bad case for an overload with no docstring.

Signed-off-by: Dibri Nsofor <dibrinsofor@gmail.com>
Signed-off-by: Dibri Nsofor <dibrinsofor@gmail.com>
Signed-off-by: Dibri Nsofor <dibrinsofor@gmail.com>
Signed-off-by: Dibri Nsofor <dibrinsofor@gmail.com>
Signed-off-by: Dibri Nsofor <dibrinsofor@gmail.com>
Signed-off-by: Dibri Nsofor <dibrinsofor@gmail.com>
@github-actions github-actions Bot added size/m and removed size/m labels Nov 19, 2026
@dibrinsofor dibrinsofor changed the title Lsp blame Fix, On Hover Docstring for Function Overloads Nov 19, 2026

This branch has not been deployed

No deployments
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.

support hover text for overload docstrings

2 participants