KEMBAR78
Use MessageBuilder.pretty_callable in more places · Issue #5490 · python/mypy · GitHub
Skip to content

Use MessageBuilder.pretty_callable in more places #5490

@ilevkivskyi

Description

@ilevkivskyi

Currently callable types in many error messages are formatted as

Callable[[Arg('x', int), VarArg(str)], int]

We should probably switch to more "native" format that is already used in some errors (e.g. for protocol and overloads):

def (x: int, *args: str) -> int

The main obstacle here is probably updating all tests that use the old format.

This is a follow up for #5463

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions