fake-bpy-module
fake-bpy-module copied to clipboard
bpy_prop_collection.__getitem__() should accept slice too
bpy_prop_collection.__getitem__() can use slice, but is not present in the type hint.
def __getitem__(self, key: typing.Optional[typing.Union[int, str]]
) -> 'GenericType':
'''
:param key:
:type key: typing.Optional[typing.Union[int, str]]
:rtype: 'GenericType'
'''
...
Adding slice would fix this issue.
def __getitem__(self, key: typing.Optional[typing.Union[int, str, slice]]
) -> 'GenericType':
'''
:param key:
:type key: typing.Optional[typing.Union[int, str, slice]]
:rtype: 'GenericType'
'''
...
To fix this, should Blender documentation be updated?