Skip to content

stubgen: import List[module #9970

@hiaselhans

Description

@hiaselhans

Bug Report

stubgen created C++ stubs are wrong.

To Reproduce

I created a nested pybind11 module.

mymodule

  • submodule1
  • submodule2

then ran stubgen -p mymodule

Expected Behavior

correct stubs should be generated

Actual Behavior

in submodule1.pyi:

import List[mymodule.submodule1

also __init__ functions are overloaded with return type of the class.

Your Environment

  • Mypy version used: 0.790
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.9.1
  • Operating system and version: archlinux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions