fake-bpy-module icon indicating copy to clipboard operation
fake-bpy-module copied to clipboard

Fix: exclude impossible None from collection_idprop.values (#360)

Open Andrej730 opened this issue 5 months ago • 0 comments
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.

Andrej730 avatar Jun 16 '25 16:06 Andrej730