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

Ingo Müller llvmlistbot at llvm.org
Fri Sep 19 06:56:04 PDT 2025


ingomueller-net wrote:

> The patterns file doesn't work like how it looks like it works - the string that is matched is the name of the method/function instead of the type (the arg/return types don't appear at all in the candidate). So if we did it with a pattern file we'd have almost exactly the same number of patterns as `nb::sigs`. I realized what I should do is just actually change the signatures to be in terms of the `Py*` types instead of disguising the opaque structs as the corresponding `Py*` types.

Right, but can't we match `.*` (with no other effects) and add a few `\from` imports for basically every method? I haven't tested and won't be offended if you don't want to; just throwing around random thoughts... 😉

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


More information about the Mlir-commits mailing list