Josverl / micropython-stubber

Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
https://micropython-stubber.readthedocs.io
Other
170 stars 14 forks source link

stubgen cannot create `.pyi` stubs for umqtt.robust #138

Closed Josverl closed 2 years ago

Josverl commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

stubgen cannot create .pyi stubs for umqtt.robust

robust.py contains from . import simple but there is no init.py, therefore relative imports are not possible

To Reproduce in stubber Steps to reproduce the behavior:

logs

....
Calling stubgen on all-stubs/micropython-latest-frozen/esp8266/GENERIC/umqtt/robust.py
Processing 1 files...
Critical error during semantic analysis: all-stubs/micropython-latest-frozen/esp8266/GENERIC/umqtt/robust.py:2: error: No parent module -- cannot perform relative import

Screenshots If applicable, add screenshots to help explain your problem.

Stubber information

Firmware Information

Hardware information

VS Code Extension Information (please complete the following information):

Additional context Add any other context about the problem here.

Josverl commented 2 years ago

fixed by workaround in 793bbb368f2add1d264dd810bdb24b9bc32ec574