Skip to content

Wrong signature in type.__prepare__() class method #114949

Closed as not planned
Closed as not planned
@skirpichev

Description

@skirpichev

Bug report

Bug description:

Docstring of this method has following signature specification:

     PyDoc_STR("__prepare__($cls, name, bases, /, **kwds)\n"
               ...

It's wrong, the first argument should be $type (a class method). Because of this, the inspect.signature() fails to parse the __text_signature__ attribute for the method.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions