[llvm] [mlir] [MLIR][Python] reland (narrower) type stub generation (PR #157930)

Ingo Müller via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 4 00:58:13 PST 2025


ingomueller-net wrote:

> ... I think the correct annotation is actually even closer to the following (because `register_operation` [returns](https://github.com/llvm/llvm-project/blob/9605666949/mlir/lib/Bindings/Python/MainModule.cpp#L92) a function):
> 
> ```python
> def register_operation(dialect_class: type[T], *, replace: bool = False) -> Callable[[type[U]], type[U]]:
> ```
> 
> ...
> If the annotation with `Callable` sounds like a good idea, I can create a PR.

--> #170627

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


More information about the llvm-commits mailing list