question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typehints missing classes (ADC, PWM, and probably more)

See original GitHub issue

Hi,

I recently started playing with ESP32 and MicroPython. This plugins looks like a great idea to make things easier however there are some missing modules for ESP8266 and ESP32.

So I did some reading on how this plugin works and found all type hints to be updated 2 years ago, which made me wonder whether they are maintained manually or generated from MicroPython code.

I came across this tool https://github.com/Josverl/micropython-stubber which helps to create pyi files directly on the device itself.

I’m still not sure how to use the stubber, however my idea is to use it to generate stubs and contribute them to this project or to typeshed to keep the type hinting up to date with less effort.

@vlasovskikh What do you think about this idea? Would you be willing to give me a hand to make this happen?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hlovattcommented, Aug 8, 2021

I’m creating high quality typesheds/stubs including documentation as well as types, see https://github.com/hlovatt/PyBoardTypeshed and then hopefully they will all be included in the Micropython plugin (many of the existing typesheds/stubs in Micropython come from this project). Give me a few weeks and I should have done the complete stack for a PyBoard at least 😃.

1reaction
w0nd4bracommented, Jun 17, 2020

I can upload the files here on Github if you want. There is nothing special to talk about it,i just want to make you guys to make the plugin better, i cant do it. Just want to use the plugin and pycharm to have some fun with my esp32.

Have some ESP-01 laying around, will check later if its the 1mb version or just the 512k one (so i can flash MicroPython). So we have some files for the ESP8266 too.

Edit:

installed latest micropython on my ESP-01, worked for me. Created a git with all the files the script gave me so far (for the ESP32 and the ESP8266).

if u want me to do more, i can try to make it better, cause there is no doc, its just the skeleton.

greetings

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typehints missing classes (ADC, PWM, and probably more)
Hi, I recently started playing with ESP32 and MicroPython. This plugins looks like a great idea to make things easier however there are...
Read more >
python - How do I correctly add type-hints to Mixin classes?
I am thinking about rewriting the part using the mixins as I don't particularly like it and the same could probably be done...
Read more >
Python Type Checking (Guide) - Real Python
In this guide, you'll look at Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit...
Read more >
PEP 484 – Type Hints - Python Enhancement Proposals
Type hints may be built-in classes (including those defined in standard library or third-party extension modules), abstract base classes, types available in the ......
Read more >
Type hints - The Blue Book
Helps refactoring: Type hints make it trivial to find where a given class is ... it probably pays off in spending less time...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found