[Mlir-commits] [mlir] [mlir][python] Make Python bindings compatible with Nanobind v3.0.0. (PR #218562)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Aug 24 17:48:33 PDT 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/NanobindUtils.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/NanobindUtils.h b/mlir/include/mlir/Bindings/Python/NanobindUtils.h
index a2950c70d..4f3dd7446 100644
--- a/mlir/include/mlir/Bindings/Python/NanobindUtils.h
+++ b/mlir/include/mlir/Bindings/Python/NanobindUtils.h
@@ -491,8 +491,7 @@ public:
            "expected nanobind::type to succeed for Sliceable elemTy");
     nanobind::str elemTyName = nanobind::type_name(elemTyInfo);
     std::string sig = std::string("class ") + Derived::pyClassName +
-                      "(collections.abc.Sequence[" +
-                      elemTyName.c_str() + "]";
+                      "(collections.abc.Sequence[" + elemTyName.c_str() + "]";
     if constexpr (!Derived::typeParams.empty()) {
       sig += ", typing.Generic[";
       for (size_t i = 0; i < Derived::typeParams.size(); ++i) {

``````````

</details>


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


More information about the Mlir-commits mailing list