Skip to content

No error if derived type is different from annotated type #3945

Description

@henryJack

Take this incorrectly annotated example:

x: bool = 5

Gives no mypy error. Surely if mypy knows that Type(int) is different to Type(bool), we could have a new mypy warning of Annotated type different to derived type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions