Help with VSCode Stubs and Linter

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
bangell3
Posts: 1
Joined: Thu Jun 02, 2022 4:27 pm

Help with VSCode Stubs and Linter

Post by bangell3 » Thu Sep 29, 2022 3:17 pm

I am a beginner and am having trouble getting the the micropython stubs and the Pylint extension to work properly

I am developing on an esp32 devkit and using VSCode and trying to use the stubs found here
https://micropython-stubs.readthedocs.i ... stubs.html

I have the most recent stub code from gethub and have used the pip install command to install the correct version of the stubs to my workspace. When I open any project file in my workspace almost every line of code gets marked with a "problem" when I know the code runs properly. I have been trying to find a solution to this online for a little while and have not found anything that works.

As for the linter I installed the Pylint extension is VSCode. I believe Pylint is supposed to have active linting, but it does not do anything for me. Even when I try to use the "run linter" command when I intentionally put spacing mistakes in my code nothing seems to happen. It does not give me any kind of error either, just nothing happens. I have tried reloading the VSCode window and restarting the Pylint server but neither fixed the problem. I currently have Pylint version v2022.4.0 installed.

I am not sure if it helps but I am using micropython version 18. I am also unsure if the problems with the stubs and the linter have a related solution in anyway or not.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Help with VSCode Stubs and Linter

Post by jimmo » Fri Sep 30, 2022 12:01 am

bangell3 wrote:
Thu Sep 29, 2022 3:17 pm
I am a beginner and am having trouble getting the the micropython stubs and the Pylint extension to work properly
This forums is no longer active. Please ask new questions at https://github.com/orgs/micropython/discussions instead.

The stubs aren't maintained by the MicroPython team, however I believe the author of that project is active on both the GitHub Discussions and on Discord (https://micropython.org/discord). You could also try raising an issue there.
bangell3 wrote:
Thu Sep 29, 2022 3:17 pm
using micropython version 18
Guessing you mean v1.18? I don't the version installed on the board will impact the stubs from working though, it just affects which stubs you see.

Post Reply