Replies: 2 comments 4 replies
-
Behavior in pyright and pylance should be the same in this case. Can you provide a concrete example of the problem you're seeing? When you say "gives details of wildcard imports", what do you mean? In what context? Are you referring to completion suggestions? Auto-import suggestions? Hover text? |
Beta Was this translation helpful? Give feedback.
-
Okay. I will do a full walkthrough of my experience. The code sample I am working from has been losely based on this. Pylance With Pylance installed, everything works as I would like. There are no configuration changes needed and the wildcard imports are correctly handled. PyRight With pyright installed, first I get errors. I added this setting to my vscode config... "python.analysis.diagnosticSeverityOverrides": {
"reportWildcardImportFromLibrary": "none",
} And now I still get all the wildcard imports not being definied. (My Pyright version is v1.1.265) |
Beta Was this translation helpful? Give feedback.
-
I know this has been covered before, but a major usecase of wildcard imports is in machine learning. Lots and lots of developers in the AI field use wildcard imports (Take the fastai library for example).
As well as this, Pylance happily gives details of wildcard imports, where as pyright will not. I would love to see this feature implemented, but disabled by default :))
I tried checking for similar discussions, but even after disabling pyrights errors, it says variables are "unknown", rather than actually getting data about the objects like pylance.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions