Nanobind can now auto-generate a type stubs for the wrapper code. This has been used with Basix (https://github.com/FEniCS/basix/pull/829).