crypt0lith
crypt0lith
> **Edited:** the original repro, a plain `self` in `Impl` overriding `HasGet.get(self: HasValue)`, isn't a bug: the override accepts every receiver the base method accepts on `Impl`. It's replaced with...
Constructing a generic `dict` subclass with keyword arguments leaves the key type `Unknown`, although the same call on `dict` infers `str`: ```python class D[K, V](dict[K, V]): ... reveal_type(dict(key=1)) reveal_type(D(key=1)) ```...
### Describe the Bug ```python from typing import Callable def identity[**P, R](cb: Callable[P, R]) -> Callable[P, R]: return cb class Foo: def __init__(self, value: int) -> None: ... @classmethod def...
### Summary When the annotated `self` of a class's `__init__` method is declared with an unused type parameter scoped to `__init__`, ty specializes the class with the method's unsolved type...
**Describe the bug** Static conditional evaluation applies to `sys.version_info`, `sys.platform` and `os.name` when `sys` or `os` is a parameter that shadows the imported module. The condition evaluates statically to false,...
**Describe the bug** Static conditional evaluation treats `sys.version_info` as equal to a tuple of the configured major and minor version. At runtime `sys.version_info` compares greater than that tuple, so `>`,...
**Describe the bug** `typename` and `field_names` of `collections.namedtuple` are positional-or-keyword, but pyright takes the class name from the call's first argument and the fields from its second, even when those...