From a25340f7cf15545f916f81eadfea059dbaf55ed5 Mon Sep 17 00:00:00 2001 From: Joseph HENRY Date: Tue, 31 Mar 2026 16:39:50 +0200 Subject: [PATCH] Fix bpy_types.Context annotation not being qualified to bpy.types.Context Co-Authored-By: Claude Opus 4.6 (1M context) --- introspect.py | 1 + 1 file changed, 1 insertion(+) 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