[Mlir-commits] [mlir] [mlir:python] Add manual typing annotations to `mlir.register_*` functions. (PR #170627)
Maksim Levental
llvmlistbot at llvm.org
Thu Dec 4 14:24:36 PST 2025
================
@@ -114,6 +118,10 @@ NB_MODULE(_mlir, m) {
return typeCaster;
});
},
+ nb::sig("def register_type_caster(typeid: _mlir.ir.TypeID, *, "
+ "replace: bool = False) "
+ "-> typing.Callable[[typing.Callable[[T], U]], "
----------------
makslevental wrote:
I don't have a strong opinion - what you have currently looks fine to me. If someone comes along and wants tighter constraints for some reason we can narrow it then.
https://github.com/llvm/llvm-project/pull/170627
More information about the Mlir-commits
mailing list