Skip to content

stubgen: mangles from _typeshed import Incomplete on Windows #16658

Open
@Josverl

Description

@Josverl

Bug Report
When stubgen creates stubs for a module that imports Incomplete , it then mangles / overcomplicates the import in the generated stub
edit : On Windows

To Reproduce - minimal repro

from _typeshed import Incomplete


def polar(*args, **kwargs) -> Incomplete:
    ...

running stubgen results in

from _typeshed import Incomplete as Incomplete

def polar(*args, **kwargs) -> Incomplete: ...

Environment

  • Mypy version used: 1.7.0
  • Mypy command-line flags: - none
  • Mypy configuration options from mypy.ini (and other config files): None
  • Python version used: 3.11
  • OS: Windows_NT x64 10.0.26100

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions