Skip to content

[mlir:python] Types created by mlir_type_subclass are ignored by nanobind's stubgen #127518

Closed
@ingomueller-net

Description

@ingomueller-net

If we expose an mlir::Type to Python using mlir_type_subclass (like here), nanobind's stubgen does not create any output for that class. This is unlike functions using nb::class_ (like this example).

I believe that stubgen only creates typing information for a class if the type(.) of the class object is a subclass of type (according to this test), which isn't the case for how mlir_type_subclass currently works.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions