Skip to content

Types from the typing module that don't exist in the specified Python version are not detected by Mypy #6593

Closed
@matthewslouismarie

Description

@matthewslouismarie

Hello there,

I think this is not the desired behaviour of Mypy. If I set the version of Python to 3.5, it doesn't report Deque imports, even though this type only appeared in Python 3.6.

mypy.ini:

[mypy]
python_version = 3.5

The python code:

from typing import Deque

...

This does not report any errors with mypy 0.670.

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