-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrong
Description
Here is a minimum reproducible example of this bug:
from typing import Any, assert_type
def foo[T](typ: type[T]) -> T: ...
assert_type(foo(Any), Any)
reveal_type(foo(Any), Any)
reveal_type(Any)which produces this output:
error: Expression is of type "Any", not "Any" [assert-type]
note: Revealed type is "typing.Any"
note: Revealed type is "def () -> typing.Any"
I did not expect this to cause any mypy errors.
Or, it would say that Any is not a type.
Your Environment
- Mypy version used: mypy 1.19.1 (compiled: yes)
- Mypy command-line flags: NA
- Mypy configuration options from
mypy.ini(and other config files): NA - Python version used: 3.13.9 (also reproduced in 3.14.3)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong