😳
fromtypingimportGeneric, TypeVar, MappingT=TypeVar("T")
T2=TypeVar("T2")
classA(dict[T, T2]):
...
deffoo(**i: float) ->None:
...
a: A[str, str]
d= {"a": "b"}
foo(**a) # no errorfoo(**d) # error: Argument 1 to "foo" has incompatible type "**Dict[str, str]"; expected "float"https://mypy-play.net/?mypy=latest&python=3.10&gist=1cbdc48546f3a1bc61476936c3dc9af7
Might be related to #11138
😳
https://mypy-play.net/?mypy=latest&python=3.10&gist=1cbdc48546f3a1bc61476936c3dc9af7
Might be related to #11138