nutti / fake-bpy-module

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

Remove assignment to slices & keys and delitem from bpy_prop_collection #264

Closed Road-hog123 closed 5 months ago

Road-hog123 commented 5 months ago

bpy_prop_collection does not currently support assignment to slices or keys (only int indices); and while it does have a __delitem__, it just raises a TypeError "del bpy_prop_collection[key]: not supported".

bpy_prop_array does not support deleting slices.

nutti commented 5 months ago

@Road-hog123

The original patch is introduced by #241 . Which is the correct one?

Road-hog123 commented 5 months ago

This PR improves on #241, fixing issues introduced by my assumption that key would be typed the same for all three methods, and that if dir() reveals __delitem__ it would actually be implemented. Now that I've actually inspected the source code, I can see that my assumptions were incorrect.

nutti commented 5 months ago

@Road-hog123 Thank you!