[Mlir-commits] [mlir] [MLIR] [Python] Added return type to `__repr__` in the adaptors (PR #182867)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Feb 24 01:35:51 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h -- mlir/include/mlir/Bindings/Python/NanobindAdaptors.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
index d101315f4..538681053 100644
--- a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
+++ b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
@@ -656,7 +656,7 @@ public:
     def("__repr__",
         [superCls, captureTypeName](nanobind::object self) -> nanobind::str {
           return nanobind::repr(superCls(self))
-                  .attr("replace")(superCls.attr("__name__"), captureTypeName);
+              .attr("replace")(superCls.attr("__name__"), captureTypeName);
         });
     if (getTypeIDFunction) {
       // 'get_static_typeid' method.

``````````

</details>


https://github.com/llvm/llvm-project/pull/182867


More information about the Mlir-commits mailing list