Josverl / micropython-stubber

Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
https://micropython-stubber.readthedocs.io
Other
173 stars 14 forks source link

add support for and documentation for pylance #35

Closed Josverl closed 3 years ago

Josverl commented 3 years ago

there seem to be a few things that do not work quite well yet

Josverl commented 3 years ago

would be good to support pylance

in a quick test is seems that pylance does not work with the same configuration as worked for MPLS, so this requires some additional exploration

see also : https://github.com/BradenM/micropy-cli/issues/152

Josverl commented 3 years ago

as mentioned by @CallumJHays , simplify the old config to allow PyLance to work

{
    "python.languageServer": "Pylance",
    "python.autoComplete.extraPaths": [
        ".micropy/esp32_p1_meter",
        "src/lib",
        "all-stubs/cpython_patch",
        "all-stubs/mpy_1_13-nightly_frozen/esp32/GENERIC", 
        "all-stubs/esp32_1_13_0-103",
    ],
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true,
}