basedmypy
basedmypy copied to clipboard
intersections don't work on `TypedDict`s
Describe the problem, ie expected/actual result (if it's not blatantly obvious)
No response
Gist to reproduce
from __future__ import annotations
from typing import TypedDict
class Foo(TypedDict):
a: int
class Bar(TypedDict):
b: str
# Incompatible types in assignment (expression has type "dict[str, int | str]", variable has type "Foo & Bar") [assignment]
asdf: Foo & Bar = {"a": 1, "b": ""}