Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove type checker-specific symbols from builtins.pyi and typing.pyi #7580

Open
Labels
stubs: improvementImprove/refactor existing annotations, other stubs issues
@JelleZijlstra

Description

@JelleZijlstra

I'm working to get rid of the type checker-specific symbols that currently are in our core stubs but don't exist at runtime. I'll use this issue to track the work needed. This involves changes both to typeshed and to type checkers.

Affected names:

  • typing._TypedDict. Suggesting to rename to_typeshed.TypedDictFallback. (mypy and pyright)
  • typing._promote ->_typeshed._promote (mypy only)
  • typing.AwaitableGenerator ->_typeshed.AwaitableGenerator (mypy and pyright)
  • builtins.function (mypy and pyright). Need to look more into why we can't just usetypes.FunctionType.
    • Working on this in mypy but it requires updating a ton of test cases
  • builtins.ellipsis (mypy and pyright). Should add a new name to _typeshed, similar toNoneType.

builtins.module was also mentioned in the past but it's been fixed already (mypy PR:python/mypy#3107).

Linked issues and PRs:

Metadata

Metadata

Assignees

No one assigned

    Labels

    stubs: improvementImprove/refactor existing annotations, other stubs issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp