DetachHead
DetachHead
the primer identified this issue with constrained typevars: ```py from typing import Literal class Foo[T: (int, str)]: ... def asdf(value: object): if isinstance(value, Foo): reveal_type(value) # `Foo[object]`, should be `Foo[int]...
> this bug happen with basedpyright but not with pyright this is because `reportMissingTypeStubs` is enabled by default in basedpyright but not pyright. you can check this by setting `typeCheckingMode`...
it should probably just guess the name of the stubs package and tell you to try installing it. that would be consistent with what typescript (and i think mypy?) does
python differs from typescript in that most 3rd party stubs are already bundled with typeshed, so it's more likely that whenever you encounter this error it means there's no stubs...
there should be an error on both the definition of an abstract method with an implementation, and any `super()` calls to it: ```py from abc import ABC, abstractmethod from typing...
when we do this, we also need to update the check introduced in #352 to account for this new rule
same with protocols
using `@final` probably isnt the best solution here since `TypedDict`s are structural (#621). we should probably instead wait until https://peps.python.org/pep-0728/
> does builtins specialization count as a plugin? while i don't like special-casing, don't think it necessitates a plugin since there is already a lot of special casing for builtins...
i guess its safe to narrow `any` but not `all` > or it's not disjoint separate issue with narrowing in general: #1444