-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pylance Support #152
Comments
Very interesting. Have you personally tried this? If so, how did it compare to the current ms-python + micropy stubs combo? I've been very late putting out a release with the recent changes, so I will try and get that done today and then take a deeper look into this. On a side note, @hlovatt recently contacted me with a new project he's working on that generates stubs with docstrings + typing parsed straight out of micropython's documentation. See: hlovatt/PyBoardTypeshedGenerator |
I've not played around with it yet in micropython I believe Circuit Python uses a similar method to generate stubs |
this setting works well for me. |
While Pylance (v2020.10.3) now finds the stubs, it misses |
i've been looking into this from micropython-stubber to understand what needs to be done to get Lancelot happy. @ShenTengTu , as yo seem to have a working config , could you share your setup please ? |
Hey, Just gave this a quick try. removing all options but "python.analysis.extraPaths" seems to be all thats needed for setting up with pylance. Setting "python.analysis.typeShedPaths" as in the generated config appears to cause pylance's inferencing to play up. Working config: {
"python.linting.enabled": true,
"python.analysis.extraPaths": [
".micropy/BradenM-micropy-stubs-3cc928b/frozen",
".micropy/BradenM-micropy-stubs-e1b8ce6/frozen",
".micropy/BradenM-micropy-stubs-3cc928b/stubs",
".micropy/bdsim.micropython"
],
"python.linting.pylintEnabled": true
} |
Thanks @CallumJHays , I can confirmthat pylint works better when dropping the additional paths it may be needed to add an explicit
Ill update the upstream documentation tracked by : Josverl/micropython-stubber#35 |
Awesome! Is anyone here interested in pulling together a PR to add a template option for pylance in micropy-cli? If not, I will try to get to it soon. |
This is probably more a research project, but I wanted to put it out there to get input.
https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
Micropy-cli uses :
I wonder if Micropy-cli should also set similar sounding Pylance Settings
Like I said, I'm not 100%. What do you think?
The text was updated successfully, but these errors were encountered: