Closed code2graph closed 10 months ago
Maybe you've specified wrong line. Remember that lines are 0-based in LSP.
Does python-lsp-server
support wild card imports? I think that's the issue.
from GPT4Readability.utils import *
Pylsp is only a wrapper over several Python code completion and linting libraries. In this case Jedi is used to get definitions.
So, please ask in its repo if Jedi supports star imports (I guess not and that's why you don't get the definition you want).
I am sending a go to definition request to
pylsp
usingwebsockets
. However, correct deifinition is not returned.Here is the definition_request:
For the following code, I want to get the definition for
check_files_in_directory
which is defined in theGPT4Readability.utils
file. But somehowpylsp
is not able to provide me with the correct definition location.GPT4Readability/readme_gen.py
file:I get the following response:
Very strange as it thinks that
check_files_in_directory
is defined in the sameGPT4Readability/readme_gen.py
file. Why is that?Am I missing something in this case?