8000 Unable to resovle references type variables · Issue #636 · python-lsp/python-lsp-server · GitHub
[go: up one dir, main page]

Skip to content

Unable to resovle references type variables #636

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

Open
svartkanin opened this issue Apr 30, 2025 · 2 comments
Open

Unable to resovle references type variables #636

svartkanin opened this issue Apr 30, 2025 · 2 comments

Comments

@svartkanin
Copy link
svartkanin commented Apr 30, 2025

When using type variables in class names for example

class Test[ValueT]:
    def __init__(self, value: ValueT) -> None:
        self.value = value


t = Test[int](1)

and then trying to resolve the references for Test will not find any references nor definitions.

[telescope.builtin.lsp_definitions]: No LSP Definitions found

Removing the type variable from the class as a counter check makes it work again

@krassowski
Copy link
Member

What is SubTest? A more complete example would help.

This might be a limitation of jedi.

@svartkanin
Copy link
Author

That was a typo, I've also updated the example.

When trying to find references from the class definition class Test[ValueT] or declarations from the usage Test[int](1) the LSP can't find them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0