pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Add paths next to references when "Show Call Hierarchy" is run

Open luabud opened this issue 2 years ago • 2 comments

It'd be nice to add paths next to the function names that show when running "Show Call Hierarchy" to better differentiate where they're coming from.

The screenshot below is from the FastAPI repo after installing the dependencies in a .venv, opening .venv/Lib/site-packages/starlette/responses.py and then selecting "Show call hierarchy" on JSONResponse

image

This would match what we have for "show type hierarchy": image

luabud avatar Nov 11 '23 02:11 luabud

Dupe of https://github.com/microsoft/pylance-release/discussions/2854? Although for the example I put in there I was thinking that we'd show a class name instead of a path. Maybe we need both? Or one or the other depending on the scenario?

debonte avatar Nov 11 '23 19:11 debonte

Yeah it seems to be a dupe, but good point that the path may not be enough. Maybe both would be a good approach? We seem to support the following format for "Show Type Hierarchy":

image

luabud avatar Nov 27 '23 21:11 luabud