You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JDSmith discovered something quite interesting: lv_micropython includes a json file with all the calling information, structure members, etc. In my build I found it in mpy-cross/build/lvgl/lv_mpy.json (see comment here).
Seems like an easy target to translate and give type information to parameters, with some type translation (e.g. enum_type -> int, etc.). This could be done either by fully parsing this file, or by adding in parameter information from this file to your generated .pyi's. Here's an example from the json:
Josverl
changed the title
Enhance lvgl stubs by reading parameters from lvgl json
Enhance lvgl stubs by reading parameters & typing from lvgl json
Nov 13, 2021
JDSmith discovered something quite interesting: lv_micropython includes a json file with all the calling information, structure members, etc. In my build I found it in
mpy-cross/build/lvgl/lv_mpy.json
(see comment here).Seems like an easy target to translate and give type information to parameters, with some type translation (e.g. enum_type -> int, etc.). This could be done either by fully parsing this file, or by adding in parameter information from this file to your generated .pyi's. Here's an example from the json:
vs:
Merging these would end up with something like:
Here are the types mentioned (and their frequency), leaving out those ending
_t
, which are already exposed as classes:Copied from : #97
The text was updated successfully, but these errors were encountered: