[Mlir-commits] [mlir] a615249 - [MLIR][Python] Fix PDLResultList bindings (#161102)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Sep 29 09:11:51 PDT 2025
Author: Billy Zhu
Date: 2025-09-29T09:11:47-07:00
New Revision: a615249d02549c82913dc8c744d769ab41e7385e
URL: https://github.com/llvm/llvm-project/commit/a615249d02549c82913dc8c744d769ab41e7385e
DIFF: https://github.com/llvm/llvm-project/commit/a615249d02549c82913dc8c744d769ab41e7385e.diff
LOG: [MLIR][Python] Fix PDLResultList bindings (#161102)
Adds argument names to the method stubs for PDLResultList (from
https://github.com/llvm/llvm-project/pull/159926).
Added:
Modified:
mlir/lib/Bindings/Python/Rewrite.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/Rewrite.cpp b/mlir/lib/Bindings/Python/Rewrite.cpp
index 20392b9002706..f18298ecaf415 100644
--- a/mlir/lib/Bindings/Python/Rewrite.cpp
+++ b/mlir/lib/Bindings/Python/Rewrite.cpp
@@ -155,7 +155,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
mlirPDLResultListPushBackValue(results, value);
},
// clang-format off
- nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Value") ")")
+ nb::sig("def append(self, value: " MAKE_MLIR_PYTHON_QUALNAME("ir.Value") ")")
// clang-format on
)
.def(
@@ -164,7 +164,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
mlirPDLResultListPushBackOperation(results, op);
},
// clang-format off
- nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Operation") ")")
+ nb::sig("def append(self, op: " MAKE_MLIR_PYTHON_QUALNAME("ir.Operation") ")")
// clang-format on
)
.def(
@@ -173,7 +173,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
mlirPDLResultListPushBackType(results, type);
},
// clang-format off
- nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Type") ")")
+ nb::sig("def append(self, type: " MAKE_MLIR_PYTHON_QUALNAME("ir.Type") ")")
// clang-format on
)
.def(
@@ -182,7 +182,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
mlirPDLResultListPushBackAttribute(results, attr);
},
// clang-format off
- nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Attribute") ")")
+ nb::sig("def append(self, attr: " MAKE_MLIR_PYTHON_QUALNAME("ir.Attribute") ")")
// clang-format on
);
nb::class_<PyPDLPatternModule>(m, "PDLModule")
More information about the Mlir-commits
mailing list