pyright icon indicating copy to clipboard operation
pyright copied to clipboard

Static Type Checker for Python

Results 84 pyright issues
Sort by recently updated
recently updated
newest added

A regression introduced in 1.1.337 breaks the following: ```python from typing import Generic, TypeVar T = TypeVar("T") U = TypeVar("U") class Test2(Generic[T, U]): def __init__(self): pass def test2(self) -> None:...

bug

Pyright is unable to infer the type of bound type variable in generic function under certain conditions. ```python from collections.abc import Callable from typing import TypeVar, Generic T = TypeVar('T',...

bug
constraint solver

Thanks for addressing https://github.com/microsoft/pyright/issues/5838! In pyright 1.1.325, the following code: ```py from typing import Callable, Generic, TypeVar A = TypeVar("A") B = TypeVar("B") class Gen(Generic[A]): ... def id_(x: A) ->...

bug

**Disclaimer:** Not sure if this is a bug or expected behavior but that was at least unexpected for me and I did not manage to find relevant information here or...

bug

Prior to version [1.1.357](https://github.com/microsoft/pyright/releases/tag/1.1.357) the following code was type checked as I expected. ```python from collections.abc import Callable def d[T, R](c: Callable[[T], R]) -> Callable[[T], R]: ... @d def f[A,...

bug

Not sure if this belongs here, but I'm getting erroneous type errors for the `attrs` module. Field definitions like this: ```python from attrs import field, frozen, validators @frozen class Control:...

bug

For the following code, pyright is doing something weird: ```python from typing import Protocol class P(Protocol): def __call__[T](self, a: T) -> T: ... def f[T](a: T) -> T: return a...

bug

Pyright should produce an error for the following code, as `object` cannot be assigned to `T@f`. ```python from collections.abc import Callable def f[T](v: object, c: Callable[[], Callable[[T], object]]) -> None:...

bug

I am writing a library that does some runtime type checking, so I am working with type-objects a lot. I encountered the following: ```python >>> from typing import Literal >>>...

bug

## Environment data - Language Server version: 2023.12.1 - OS and version: macOS Sonoma 14.2 - Python version: 3.12.0 - Conda version 23.10.0 - Sympy version: 1.12 ## Code Snippet...

needs investigation