Open alleycat58uk opened 6 years ago
The MicroPtyhon plugin for PyCharm knows about MicroPython modules thanks to Python stub files with type hints (see PEP 484). Type hints are located here and are structured as:
u
-prefixed modules for the MicroPython standard libraryI found dht
at this documentation page. This module is not covered by type hints yet.
A pull request with a stub for dht
for ESP8266 is welcome. The folder for the stub file is https://github.com/vlasovskikh/intellij-micropython/tree/master/typehints/esp8266. Please take a look at other stub files to get an idea of how they should look like.
I'm using a DHT22 temperature and humidity sensor and use the following import:
from dht import DHT22
PyCharm flags this as an unresolved reference however, the MicroPython firmware includes this library. If I ignore this and upload my code, it runs without error.
I'm running:
Shouldn't the dht library be recognised or have I missed something?