diff --git a/introspect.py b/introspect.py index aa9615e..bc657e2 100644 --- a/introspect.py +++ b/introspect.py @@ -949,6 +949,7 @@ def _annotation_to_type_str(ann: object) -> str: s = ann if isinstance(ann, str) else str(ann) # Clean up internal module references s = s.replace("_bpy_types.", "bpy.types.") + s = s.replace("bpy_types.", "bpy.types.") # typing.Union[X, Y] -> X | Y s = re.sub(r"\bUnion\[([^\]]+)\]", lambda m: " | ".join(m.group(1).split(", ")), s) # typing.Optional[X] -> X | None