Micropython modules conflicting with existing modules on visual studio code

January 28, 2024, 18:28

developful

So i've got a project that I created using micropico
json
{
    "python.linting.enabled": true,
    "python.languageServer": "Pylance",
    "python.analysis.typeCheckingMode": "basic",
    "python.analysis.diagnosticSeverityOverrides": {
        "reportMissingModuleSource": "none"
    },
    "micropico.syncFolder": "",
    "micropico.openOnStart": true,
    "python.analysis.typeshedPaths": [
        ".vscode\\Pico-W-Stub"
    ],
    "python.analysis.extraPaths": [
        ".vscode\\Pico-W-Stub"
    ]
}
this is the settings.json. My issue is that doing import os, the intellisense will think im using the usual python os module, not the one declared in the Pico-W-Stub folder. Is there any way to override this?

developful

this is also the folder hierarchy (though Pico-W-Stub is just a link)

developful

Adding main.py to the Pico-W-Stub folder and then doing from . import os works, but I don't really wanna do that

developful

Running the file does work, its just purely intellisense