nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.3k stars 95 forks source link

BMEdgeSeq.new() verts parameter untyped #245

Closed Road-hog123 closed 3 weeks ago

Road-hog123 commented 1 month ago

BMEdgeSeq.new()'s verts parameter is typed as "pair of BMVert" in the RST, but "pair of x" is not interpreted as "sequence of x" by the generation code—should this be handled in the generation code, or should I change the documentation to use the word "sequence"?

nutti commented 1 month ago

Changing the documentation is not good for this case. In my understanding, BMEdgeSeq.new() accepts two elements of array. So, we need to add a logic to data type refiner.

https://github.com/nutti/fake-bpy-module/blob/master/src/fake_bpy_module/transformer/data_type_refiner.py

Are you willing to do this?

You can refer the similar code in the DataTypeRefiner._get_refined_data_type_fast method. https://github.com/nutti/fake-bpy-module/blob/master/src/fake_bpy_module/transformer/data_type_refiner.py#L137

nutti commented 3 weeks ago

This issue is now fixed.