Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show class hierarchy or method override like pycharm #355

Open
elskito opened this issue May 12, 2024 · 4 comments
Open

show class hierarchy or method override like pycharm #355

elskito opened this issue May 12, 2024 · 4 comments
Labels
pycharm parity feature that exists in pycharm but not pyright vscode the extension for vscode/vscodium

Comments

@elskito
Copy link

elskito commented May 12, 2024

When using Pycharm, I have the ability to check at a glance if a given method or class has corresponding children or parents. Could you please add similar functionality to basedpyright? This is a game changer when opening huge projects with lots of multi inheritance :)

image
@DetachHead DetachHead added the pycharm parity feature that exists in pycharm but not pyright label Jun 13, 2024
@DetachHead
Copy link
Owner

does anyone know if the LSP protocol has anything for this? if not, it will probably need to be a vscode/vscodium only feature

@DetachHead DetachHead added vscode the extension for vscode/vscodium and removed language server labels Jul 19, 2024
@elskito
Copy link
Author

elskito commented Jul 19, 2024

I assume that LSP has something called 'hierarchy' as stated here: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/, which I believe has the ability to traverse the inheritance tree. There is also a open MR on pylance gh - microsoft/pylance-release#4972.

@DetachHead DetachHead added language server and removed vscode the extension for vscode/vscodium labels Jul 19, 2024
@DetachHead
Copy link
Owner

i really wish the LSP spec contained screenshots or some sort of visual representation of its features. it's hard to tell what any of this stuff is.

i'm looking at what i believe to be the typescript language server's "call hierarchy" and i don't understand what it's trying to show me. for example when i try to show the call hierarchy on TypeInlayHintsWalker.visitName:

image

  • where is ParseTreeWalker.visitName (the supertype)?
  • why is it showing ParseTreeWalker.visit? it has nothing to do with the visitName method
  • why is it showing the visitName method of all the other subtypes of ParseTreeWalker except the one in ParseTreeWalker itself?

it's possible i'm misunderstanding what this call hierarchy feature is supposed to be, but it seems to be completely different to the hierarchy buttons in pycharm unfortunately

@DetachHead DetachHead added vscode the extension for vscode/vscodium and removed language server labels Aug 15, 2024
@KotlinIsland
Copy link
Collaborator

That's callers of, not type hierarchy. I think it's references?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pycharm parity feature that exists in pycharm but not pyright vscode the extension for vscode/vscodium
Projects
None yet
Development

No branches or pull requests

3 participants