diff --git a/introspect.py b/introspect.py index 0ea2a17..76a5ac8 100644 --- a/introspect.py +++ b/introspect.py @@ -2039,7 +2039,11 @@ def _discover_submodules_via_dir(mod: ModuleType, parent_name: str) -> list[str] # Verify the module actually belongs to this parent # (filter out stray re-exports like 'sys', 'os', etc.) obj_name = getattr(obj, "__name__", "") - if obj_name == submodule_name or obj_name.startswith(parent_name + "."): + if ( + obj_name == submodule_name + or obj_name.startswith(parent_name + ".") + or obj_name == attr_name + ): found.append(submodule_name) return found @@ -2442,11 +2446,16 @@ def _rna_struct_to_data( properties: list[PropertyData] = [] for prop in getattr(struct_info, "properties", []): + prop_type = rna_property_to_type(prop) + is_readonly = bool(getattr(prop, "is_readonly", False)) + # Writable mathutils properties also accept Sequence[float] for assignment + if not is_readonly and prop_type in _MATHUTILS_ARRAY_TYPES: + prop_type = f"{prop_type} | Sequence[float]" properties.append( { "name": str(getattr(prop, "identifier", "")), - "type": rna_property_to_type(prop), - "is_readonly": bool(getattr(prop, "is_readonly", False)), + "type": prop_type, + "is_readonly": is_readonly, "description": str(getattr(prop, "description", "") or ""), } )