Skip to content
This repository was archived by the owner on Oct 11, 2025. It is now read-only.

Commit 01382fc

Browse files
authored
[MLIR][Python] Fix PDLResultList bindings (#161102)
Adds argument names to the method stubs for PDLResultList (from llvm/llvm-project#159926).
1 parent 0f03fe9 commit 01382fc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mlir/lib/Bindings/Python/Rewrite.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
155155
mlirPDLResultListPushBackValue(results, value);
156156
},
157157
// clang-format off
158-
nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Value") ")")
158+
nb::sig("def append(self, value: " MAKE_MLIR_PYTHON_QUALNAME("ir.Value") ")")
159159
// clang-format on
160160
)
161161
.def(
@@ -164,7 +164,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
164164
mlirPDLResultListPushBackOperation(results, op);
165165
},
166166
// clang-format off
167-
nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Operation") ")")
167+
nb::sig("def append(self, op: " MAKE_MLIR_PYTHON_QUALNAME("ir.Operation") ")")
168168
// clang-format on
169169
)
170170
.def(
@@ -173,7 +173,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
173173
mlirPDLResultListPushBackType(results, type);
174174
},
175175
// clang-format off
176-
nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Type") ")")
176+
nb::sig("def append(self, type: " MAKE_MLIR_PYTHON_QUALNAME("ir.Type") ")")
177177
// clang-format on
178178
)
179179
.def(
@@ -182,7 +182,7 @@ void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
182182
mlirPDLResultListPushBackAttribute(results, attr);
183183
},
184184
// clang-format off
185-
nb::sig("def append(self, " MAKE_MLIR_PYTHON_QUALNAME("ir.Attribute") ")")
185+
nb::sig("def append(self, attr: " MAKE_MLIR_PYTHON_QUALNAME("ir.Attribute") ")")
186186
// clang-format on
187187
);
188188
nb::class_<PyPDLPatternModule>(m, "PDLModule")

0 commit comments

Comments
 (0)