sizmailov / pybind11-stubgen

Generate stubs for python modules
Other
218 stars 44 forks source link

Fully-qualified type name is not shortend in nested annotation #183

Closed sizmailov closed 8 months ago

sizmailov commented 8 months ago

Kernel resolved correctly in a different method of this same class, but in the Callable, Kernel is left fully specified.

class Program:
    def compile_kernel(self, arg0: CompileConfig, arg1: DeviceCapabilityConfig, arg2: Kernel) -> CompiledKernelData:
        ...
    def create_kernel(self, arg0: typing.Callable[[taichi._lib.core.taichi_python.Kernel], None], arg1: str, arg2: AutodiffMode) -> Kernel:
        ...

Originally posted by @ringohoffman in https://github.com/sizmailov/pybind11-stubgen/issues/182#issuecomment-1817422285