Closed gb119 closed 1 year ago
Hi @gb119 thanks for the feedback! what do you think @spyder-ide/core-developers ?
Hmm, I'm not sure I see the same behavior in 4.2.0 on Windows (NSIS/pyinst install), testing on various files from the Spyder source tree, even with all options enabled and on files that import other classes (e.g. Mainwindow). I just see module-level constants and variables if I enabled that option, but I don't see one for imports, so I'm not sure exactly what the current UX is supposed to be, though this seems to sound like a good idea if I understand if correctly. @gb119 or @dalthviz do you have a snippet of minimal example code, and any options that need to be set, in order to demonstrate this behavior? Thanks!
I think this is more an issue than a feature, it seems that there are other cases that we're not considering in the pyls to prevent Jedi from inspecting other modules' members
Ok, I think this might actually be an issue not a feature request to change an intentional feature...
A.py
class Aa: pass class Ab: pass
B.py
from .A import Ab class Ba: pass
This shows Ab in the outline of B.py, but changing it from a relative import to an absolute import then doesn't show Ab. This is with the variables and attributes unticked in the outline settings.
Ok, it seems we're not catching relative imports in the Python Language Server (we're already discarding absolute imports returned as symbols by Jedi).
@andfoy, do you think that's possible?
We need to inspect the symbols call in the pyls, hopefully we can track down this case
This is solved already, so closing.
In 4.2.0 the Outline explorer shows classes that are imported from other modules - which I guess is ok, but it would be nice to be able to collapse the list of imported symbols e.g. by showing them under a virtual imports entry to allow one to focus on the classes and functions actually defined in the current file.
e.g. in the attached screen shot
I'd like to see MarkSheet...BaseTable as sub-entries of some heading that I could collapse or expand.