Open Miguel-LlamasLanza opened 1 year ago
Hey @Miguel-LlamasLanza, thanks for reporting. It's not possible to get definitions for many objects (i.e. modules and functions) of libraries in the Scientific Python ecosystem (e.g. Numpy and Pandas) because they are binary libraries and not pure Python ones. And it's only for the latter that you can actually inspect their implementations.
The best we could do is to show the stub files (i.e. pyi
ones) associated to those libraries, so users can inspect the signatures of objects declared in them. That's working for some binary libraries (e.g. PyQt) but (oddly) not for Numpy and Pandas. We'll have to investigate why that's not the case.
Thank you for your explanation. Besides those libraries, it does not work either for classes and function in my own scripts (fully python scripts). For example
from myscript import my_class
myclass.mymethod()
If I click in myclass or mymethod, it does not lead me to the other scripts.
Did you add the directory where myscript
is located to PYTHONPATH using our Python path manager?
That solved the issue in most cases, thanks! I thought that the working directory would be always included in the PYTHONPATH, but it is not the case.
However, there is still another use-case where it does not seem to work. It is when using from . import myscript
, even if I add the corresponding path to the PYTHONPATH manager
That solved the issue in most cases, thanks! I thought that the working directory would be always included in the PYTHONPATH, but it is not the case.
It is, or at least it should be. I mean, it shouldn't be necessary to add the working directory to PYTHONPATH for this to work.
Could you upload a set of files that show the problem so we can take at it on our side? Thanks!
However, there is still another use-case where it does not seem to work. It is when using from . import myscript, even if I add the corresponding path to the PYTHONPATH manager
This is odd too.
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)spyder --reset
Problem Description
Clicking on a imported module, class or function, does not open the corresponding file and show the corresponding method. It works sometimes for some modules.
What steps reproduce the problem?
What is the expected output? What do you see instead?
I would expect the corresponding file to open. Instead, it does not do anything, except in some rare cases.
Versions
Dependencies