-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Since upgrading from version 0.770 to 0.780 we saw issues, where types used during runtime were recognized as object
and not as typing.Type
anymore.
-
Are you reporting a bug, or opening a feature request?
Bug -
Please insert below the code you are checking with mypy
# test.py
from typing import Type, Union
def method(type: Type) -> None:
pass
method(int)
method(Union[int, str])
- What is the actual behavior/output?
> mypy test.py # mypy==0.780
test.py:8: error: Argument 1 to "method" has incompatible type "object"; expected "Type[Any]"
Found 1 error in 1 file (checked 1 source file)
- What is the behavior/output you expect?
> mypy test.py # mypy==0.770
Success: no issues found in 1 source file
- What are the versions of mypy and Python you are using?
Do you see the same issue after installing mypy from Git master?- Python version 3.8.2
- failing mypy versions: 0.780 + latest master
- passing mypy version: 0.770
Metadata
Metadata
Assignees
Labels
No labels