intellij-micropython
intellij-micropython copied to clipboard
How do you type hint builtins?
I've generated typesheds (pyi) from Micropython docs, See https://github.com/hlovatt/PyBoardTypeshed, and issued a pull request so that they will hopefully become part of the plugin.
But what do about builtins.pyi?
If I generate a builtins.pyi file, where do I put it?
It doesn't seem to work if I put it in stdlib!
AFAIK there is no way to do it other than builtins.pyi, but builtins.pyi already exist in the base set of stubs from Typeshed that PyCharm uses for your Python interpreter. One workaround might be to hard-code it via the code insight API of PyCharm, but having them written down declaratively in stub files seems better. I'm not sure at this point how to override builtins.pyi from Typeshed.