Currently when installing fake-bpy-module via pip it creates some modules which are folders (like bpy or bl_rna_utils) and some which are just a single file, like rna_keymap_ui. The problem is that mypydoesn't like these single-file modules. Because of this, I am not able to do type-checking with these modules.
Proposed fix
Change all the single file modules to folder modules. For example, going from rna_keymap_ui.py to
rna_keymap_ui/
__init__.py
py.typed
where __init__.py contains the exact same code as rna_keymap_ui.py and py.typed is an empty file. So, this is an extension of #92
I tested this locally on my machine, and making this change makes mypy start typechecking the module. I also tested it with vs code, and the type checker of the pylance extension didn't complain about the new structure either.
Are you willing to contribute about this feature. (Yes/No)
No. I hope that it would not be too difficult, since something similar was already done for #92 . In any case, thank you for all the work you have already put into this project!
Description about the feature
Currently when installing
fake-bpy-module
via pip it creates some modules which are folders (likebpy
orbl_rna_utils
) and some which are just a single file, likerna_keymap_ui
. The problem is thatmypy
doesn't like these single-file modules. Because of this, I am not able to do type-checking with these modules.Proposed fix
Change all the single file modules to folder modules. For example, going from
rna_keymap_ui.py
towhere
__init__.py
contains the exact same code asrna_keymap_ui.py
andpy.typed
is an empty file. So, this is an extension of #92I tested this locally on my machine, and making this change makes mypy start typechecking the module. I also tested it with vs code, and the type checker of the pylance extension didn't complain about the new structure either.
Are you willing to contribute about this feature. (Yes/No)
No. I hope that it would not be too difficult, since something similar was already done for #92 . In any case, thank you for all the work you have already put into this project!