-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
from typing import TypedDict
class A(TypedDict):
a: str
def foo(a: A):
for v in reveal_type(a.values()):
v.lower()
This produces:
test.py:7: note: Revealed type is 'typing.ValuesView[builtins.object]'
test.py:8: error: "object" has no attribute "lower"
Found 1 error in 1 file (checked 1 source file)
Expected Behavior
TypedDict.values()
to return a different type if all values of a TypedDict
are of the same type.
Your Environment
- Mypy version used: 0.910