fake-bpy-module
fake-bpy-module copied to clipboard
Fix: exclude impossible None from collection_idprop.values (#360)
trafficstars
Was testing #360 after the fix and one line from the test was still failing:
# "assert_type" mismatch: expected "list[TestPropertyGroup]" but received "list[TestPropertyGroup | None]"
assert_type(props.my_col.values(), list[TestPropertyGroup])
Though it would be to unsafe to exclude | None from bpy_prop_collection in general (e.g. Mesh.materials.values() can have nones). But it seems to be safe to exclude it from bpy_prop_collection_idprop.values() as they None never appear there.