带有 `Never` 作为选项的 `TypeVar`, 且出现了意外的 `reportArgumentType`
作者: finite-state-machine创建于 2026年9月11日更新于 2026年9月11日
标签bug
Describe the bug
Given _Z = TypeVar('_Z', SomeType, Never), and class SomeClass(Generic[_Z]), you'd expect a function parameter of type SomeClass[_Z] would accept SomeClass[Never]. It does not.
内容来源: microsoft/pyright