Skip to content

mypy prints out types in inconsistent formats depending context #1582

Closed
@ddfisher

Description

@ddfisher

Mypy has several different ways types can be displayed: the internal representation, format_simple, etc. It's confusing that the same type can be printed differently in different places. Also,. none of these formats look quite like the PEP 484 syntax.

It'd be really nice to make one canonical way that types are printed, which should look exactly like the PEP 484 syntax (but with slight additional information about type variables when appropriate). I don't think this will even be too hard to write -- the main annoyance will be updating all the tests.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions