You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Missing numpy and tensorflow completion, members not showing up #642
Commenting out all of the code in PythonModule.GetMemberNames which filters:
It's really slow to show up, but it's there. Maybe we need to drop the filters for now until we can better handle __all__. The old LS worked because it didn't even do anything.
// Try __all__ since it contains exported membersvarall=Analysis.GlobalScope.Variables["__all__"];// if (all?.Value is IPythonCollection collection) {// return collection.Contents// .OfType<IPythonConstant>()// .Select(c => c.GetString())// .Where(s => !string.IsNullOrEmpty(s));// }// __all__ is not declared. Try filtering by origin:// drop imported modules and generics.returnAnalysis.GlobalScope.Variables.Where(v =>!(v.Value?.GetPythonType()isPythonModule)&&!(v.Value?.GetPythonType().DeclaringModuleisTypingModule&&!(thisisTypingModule)))// .Where(v => v.Value?.MemberType != PythonMemberType.Generic// && !(v.Value?.GetPythonType() is PythonModule)// && !(v.Value?.GetPythonType().DeclaringModule is TypingModule && !(this is TypingModule))).Select(v =>v.Name);
So theoretically I'm not leaking typing or modules out.
Activity
MikhailArkhipov commentedon Feb 28, 2019
This is about submodules in folders you are working on
MikhailArkhipov commentedon Mar 1, 2019
Related: #490
jakebailey commentedon Mar 5, 2019
So in looking at #690, I realized that I hadn't checked
__all__for numpy, and behold:https://github.com/numpy/numpy/blob/15b092f5541e80d7c3d0108957406c6f8686aba0/numpy/__init__.py#L169
Which explains why we aren't getting numpy completion anymore; we have the
__all__filtering.jakebailey commentedon Mar 5, 2019
Commenting out all of the code in
PythonModule.GetMemberNameswhich filters:It's really slow to show up, but it's there. Maybe we need to drop the filters for now until we can better handle
__all__. The old LS worked because it didn't even do anything.MikhailArkhipov commentedon Mar 5, 2019
If we drop all filters then all the
typingand others imported will show up in the completion. But it may be smaller price to pay.jakebailey commentedon Mar 5, 2019
The above is just:
So theoretically I'm not leaking typing or modules out.
MikhailArkhipov commentedon Mar 6, 2019
OK, sure
unfilter __all__ (#708)
unfilter __all__ (microsoft#708)