When I use VSCode with pylance, if I change conda environments I get the
overriding the stdlib module ... Pylance (reportShadowedImports)
warning.
There are lots of posts about this (e.g. https://github.com/microsoft/pylance-release/issues/5191). Most of which suggest disabling the "reportShadowedImports":
"python.analysis.diagnosticSeverityOverrides": {
"reportShadowedImports": "none"
Is there a way to configure VSCode with pylance so I can switch conda environments, not disable "reportShadowedImports", and not get the "overriding the stdlib module...Pylance (reportShadowedImports)" warnings?
I found a comment in this issue.
You could rename your
code.pytomain.pyso that it doesn't conflict. It will still be loaded on boot.