paulober / MicroPico

MicroPico (aka Pico-W-Go) is a Visual Studio Code extension designed to simplify and speed up the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards.
https://marketplace.visualstudio.com/items?itemName=paulober.pico-w-go
Mozilla Public License 2.0
273 stars 25 forks source link

unsupported operator errors in typings for `int`s? #14

Closed Karel-Kroeze closed 2 years ago

Karel-Kroeze commented 2 years ago

What are the steps to reproduce this issue?

  1. Start a project
  2. use Pico-W-Go to generate project files (Configure Project)
  3. attempt to compare integers (e.g., while max_wait > 0:)

What happens?

image

What were you expecting to happen?

no errors

Any other comments?

The stubs packaged with the vanilla Pico-Go extension seem to include more files, and do not exhibit this problem. Removing the typeshed line from the generated pylance settings also removes the operator errors (but of course now complains about micropython imports).

Support info

Copy this from the Help -> Info -> Copy option in Visual Studio Code:

There is no 'Info' option under Help, this is the output from 'About'

Version: 1.70.2 (system setup)
Commit: e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:35:13.448Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.22622
paulober commented 2 years ago

Thank you for reporting this bug (next time please open it in github.com/paulober/Pico-W-Stub).

I also had errors in the linting concerning basic things. So after some searching it seems like the problem is in the builtin stubs. So i grabt the official ones from python/typeshed which should also be the one make this linting work when no custom settings were made. Expect PR with fix soon...

Ok i think the "About" is renamed in the german translation to "Info". I'll correct this in the template...

Karel-Kroeze commented 2 years ago

thank you for the quick fix!

and apologies for reporting in the wrong repository, I was already at the end of a rather long rabbit hole digging into pylance when I reported this. I'm sure I already missed multiple giant notices, but perhaps an extra mention in the bug template that bugs related to the stubs should be reported in the stubs repo might help others avoid my mistake 😄 .

paulober commented 2 years ago

No problem and glad to here that it fixes your issue.

It should have a mention, when you try to create a new issue, but maybe i have to describe it a bit more detailed, sorry for that...