Skip to content

Commit 218279d

Browse files
committed
format
1 parent 77b9bbf commit 218279d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

mlir/lib/Bindings/Python/IRCore.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,8 +1252,7 @@ void PyOperationBase::writeBytecode(const py::object &fileObject,
12521252
void PyOperationBase::walk(py::object callback, bool usePreOrder) {
12531253
PyOperation &operation = getOperation();
12541254
operation.checkValid();
1255-
MlirOperationWalkCallback walkCallback =
1256-
[](MlirOperation op,
1255+
MlirOperationWalkCallback walkCallback = [](MlirOperation op,
12571256
void *userData) {
12581257
py::object *fn = static_cast<py::object *>(userData);
12591258
(*fn)(op);
@@ -3003,8 +3002,7 @@ void mlir::python::populateIRCore(py::module &m) {
30033002
py::arg("binary") = false, kOperationPrintStateDocstring)
30043003
.def("print",
30053004
py::overload_cast<std::optional<int64_t>, bool, bool, bool, bool,
3006-
bool, py::object, bool>(
3007-
&PyOperationBase::print),
3005+
bool, py::object, bool>(&PyOperationBase::print),
30083006
// Careful: Lots of arguments must match up with print method.
30093007
py::arg("large_elements_limit") = py::none(),
30103008
py::arg("enable_debug_info") = false,

mlir/test/python/ir/operation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ def testOperationParse():
10161016
f"op_with_source_name: {o.get_asm(enable_debug_info=True, use_local_scope=True)}"
10171017
)
10181018

1019+
10191020
# CHECK-LABEL: TEST: testOpWalk
10201021
@run
10211022
def testOpWalk():
@@ -1029,7 +1030,7 @@ def testOpWalk():
10291030
}
10301031
}
10311032
""",
1032-
ctx,
1033+
ctx,
10331034
)
10341035
callback = lambda op: print(op.name)
10351036
# Test post-order walk (default).

0 commit comments

Comments
 (0)