Widen mathutils param types, fix getset_descriptor writability, add conformance tests

- Widen bare mathutils type params (Vector, Euler, etc.) to also accept
  Sequence[float], matching Blender's mathutils_array_parse C behavior
- Fix getset_descriptor readonly detection by probing __set__ on the
  descriptor instead of checking fset (which doesn't exist on C descriptors)
- Accept int | slice keys in __getitem__/__setitem__/__delitem__
- Accept Sequence[element_type] values in __setitem__ for slice assignment
- Add mathutils overrides for Matrix.Translation and Matrix.Scale
- Extend apply_overrides to support ClassName.method_name keys
- Add conformance test files from Blender docs examples
- Disable reportUnusedExpression in conformance checks

Remaining known conformance issues:
- draw_handler_add missing from SpaceView3D
- Vector not nominally Sequence[float] (buffer protocol, swizzle setters)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 18:06:11 +01:00
co-authored by Claude Opus 4.6
parent 9fa2f1c200
commit c2876bc184
10 changed files with 327 additions and 12 deletions
+1 -3
View File
@@ -760,9 +760,7 @@ def load_overrides(overrides_dir: str, module_name: str) -> dict[str, ParamOverr
return {}
def _apply_func_overrides(
func: FunctionData, func_overrides: ParamOverrides
) -> None:
def _apply_func_overrides(func: FunctionData, func_overrides: ParamOverrides) -> None:
"""Apply overrides to a single function/method."""
param_overrides = func_overrides.get("params", {})
for param in func["params"]: