pyright
pyright copied to clipboard
Static Type Checker for Python
If I want to match all `dict`s in a match statement I cannot use `case {**kw}:`. I need to use `case dict():` **Is your feature request related to a problem?...
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
Cleanup4
Consider the following code: ```python from typing import Protocol class Getter[T,U](Protocol): def __call__(self, x: T, /) -> U: ... class PolymorphicListItemGetter(Protocol): def __call__[T](self, l: list[T], /) -> T: ... def...
This is related to https://github.com/microsoft/pyright/issues/8272. I'm creating issues for each hang so I can track them separately. This particular issue specifically affects the `lobpcg` function in module `scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py`. To repro:...
In the example below, the method ```python def __invert__(self) -> "WrappedEncoder[Y, X]": decoder = invert_encoder(self.encoder) return WrappedEncoder(decoder) ``` Type checks, but if we remove the intermediate variable and directly pass...
**Describe the bug** Pyright incorrectly reports an error when supplying both a validator and a default to `attrs.field` This does not seem to be a bug with the `attrs` package,...