From 795a115441cd6781ef91db838e994184f912dabc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 4 Jul 2026 09:23:32 +0000 Subject: [PATCH] Add node_determinism to OpSchema type stubs The OpSchema binding already exposes the node_determinism property, the node_determinism keyword argument of the constructor, and the Python-side non_deterministic convenience property, but none of them were declared in the defs.pyi type stubs. Add them so type checkers and IDEs can see the determinism query interface. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QpYnitZpNfAkgkLb1o81NS Signed-off-by: Claude --- onnx/onnx_cpp2py_export/defs.pyi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/onnx/onnx_cpp2py_export/defs.pyi b/onnx/onnx_cpp2py_export/defs.pyi index f2c69b8bcbe..55ef9c88e3f 100644 --- a/onnx/onnx_cpp2py_export/defs.pyi +++ b/onnx/onnx_cpp2py_export/defs.pyi @@ -20,6 +20,7 @@ class OpSchema: outputs: Sequence[OpSchema.FormalParameter] = (), type_constraints: Sequence[tuple[str, Sequence[str], str]] = (), attributes: Sequence[OpSchema.Attribute] = (), + node_determinism: OpSchema.NodeDeterminism = OpSchema.NodeDeterminism.Unknown, # noqa: F821 ) -> None: ... @property def file(self) -> str: ... @@ -57,6 +58,10 @@ class OpSchema: def has_type_and_shape_inference_function(self) -> bool: ... @property def has_data_propagation_function(self) -> bool: ... + @property + def node_determinism(self) -> NodeDeterminism: ... + @property + def non_deterministic(self) -> bool: ... @staticmethod def is_infinite(v: int) -> bool: ... def consumed(self, schema: OpSchema, i: int) -> tuple[UseType, int]: ...