KotlinIsland
KotlinIsland
Have you tried basedmypy 1.5? It seems to handle this case correctly
I noticed this issue is impacting the mypy codebase to some extend: ```py # mypy.types.CallableArgument def accept(self, visitor: "TypeVisitor[T]") -> T: assert isinstance(visitor, SyntheticTypeVisitor) return visitor.visit_callable_argument(self) # Revealed type is...
No emoji in the title; didn't read Seems to only affect `dict`s kwarg constructor. I can't repro with any other type.
It seems to only affect `dict`: [playground](https://mypy-play.net/?mypy=master&python=3.10&flags=show-error-codes%2Callow-redefinition%2Cstrict%2Ccheck-untyped-defs%2Cdisallow-any-decorated%2Cdisallow-any-expr%2Cdisallow-any-generics%2Cdisallow-any-unimported%2Cdisallow-incomplete-defs%2Cdisallow-subclassing-any%2Cdisallow-untyped-calls%2Cdisallow-untyped-decorators%2Cdisallow-untyped-defs%2Cno-implicit-optional%2Cno-implicit-reexport%2Cstrict-equality%2Cwarn-incomplete-stub%2Cwarn-redundant-casts%2Cwarn-return-any%2Cwarn-unreachable%2Cwarn-unused-configs%2Cwarn-unused-ignores&gist=3da5354ff7a53c6daf7e526c82b30f6a)
Isn't the use case making the stubs more accurate mainly around type parameters?
As per the OP, my use case is mainly around `dict_keys` and the rest of the `collections` pre 1.9, also registered `abc`s
Looks similar to #8900 minified: ```py from typing import _T as T def foo() -> None: return bar() exit() # error: Statement is unreachable [unreachable] def deco(fn: T, a: bool...
@hauntsaninja I know, the issue is that it's a runtime error: ``` TypeError: 'TypeVar' object is not subscriptable ``` (OP has now been updated)
Related to #8900
Another usage is to ignore variance issues when you don't care about accessing the values. ```kt class Box(var t: T) fun foo(b: Box) = print(b) fun bar(b: Box) = print(b)...