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

Sergei Lebedev llvmlistbot at llvm.org
Tue Feb 24 02:37:37 PST 2026


================
@@ -653,7 +654,7 @@ class mlir_type_subclass : public pure_subclass {
         [isaFunction](MlirType other) { return isaFunction(other); },
         nanobind::arg("other_type"), nanobind::sig(kIsinstanceSig));
     def("__repr__", [superCls, captureTypeName](nanobind::object self) {
-      return nanobind::cast<std::string>(
+      return cast<nanobind : str>(
----------------
superbobry wrote:

Ready to review now.

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


More information about the Mlir-commits mailing list