The items property in EnumProperty should accept an Iterable of the items (e.g., passing a tuple is valid, but the type hints flags it as an error.
Description about the bug
I have the following:
csg_operation_items = (
('CSG_Add', 'Add', 'Add to world', 1),
('CSG_Subtract', 'Subtract', 'Subtract from world', 2),
)
And the following usage:
csg_operation: EnumProperty(
name='CSG Operation',
description='The CSG operation to perform when this brush is applied to the world',
items=csg_operation_items,
default='CSG_Add',
update=bsp_brush_update,
options=empty_set
)
System Information
Expected behavior
The
items
property inEnumProperty
should accept anIterable
of the items (e.g., passing a tuple is valid, but the type hints flags it as an error.Description about the bug
I have the following:
And the following usage:
The error I get is:
Screenshots/Files [Optional]
Additional comments [Optional]
In addition, the items themselves can actually have up to 5 elements
(id, name, description, icon, num)
, but the type hinting only expects 3.