intellij-micropython icon indicating copy to clipboard operation
intellij-micropython copied to clipboard

Missing definitions for ADC, TouchPad, onewire, ds18x20, ubinascii

Open hansonap opened this issue 7 years ago • 3 comments

Maybe I'm missing something, but this plugin seems to not recognize many of micropython's modules. For example from machine import Pin, ADC, TouchPad recognizes Pin but not ADC or TouchPad. Other modules I've come across that are not recognized:

  • onewire
  • ds18x20
  • ubinascii

I'd be happy to help remedy this situation - although I've never worked with PyCharm plugins so will need a little pointing in the right direction.

hansonap avatar Nov 27 '18 03:11 hansonap

You're talking about ESP8266 devices, right?

There is a PR #76 about ADC, you can look at it and do it in the same way. The basic idea is that in the plugin we cover these modules with Python type hinting stubs (see PEP 484 for more info).

vlasovskikh avatar Dec 06 '18 22:12 vlasovskikh

in here https://github.com/vlasovskikh/intellij-micropython/tree/master/typehints.

Maybe you need to add it yourself.

Try to write pyi based on other libraries.XD

junhuanchen avatar Dec 07 '18 02:12 junhuanchen