Closed JonathanPlasse closed 2 months ago
This issue is fixed now.
When the input to __getitem__
is a slice the return type becomes a tuple, not a single value—is it possible to define overloads in mod files for this purpose?
Yes, it is. It has been done for mathutils matmul operators. https://github.com/nutti/fake-bpy-module/blob/1f540cf284a04e09bc36e6766fc911d7cc7a3eec/src/mods/common/analyzer/append/mathutils.mod.rst?plain=1#L135-L150
bpy_prop_collection.__getitem__()
can use slice, but is not present in the type hint.Adding
slice
would fix this issue.To fix this, should Blender documentation be updated?