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

* https://github.com/actions/cache/releases * https://github.com/actions/checkout/releases * https://github.com/actions/setup-node/releases

Effectively the same as [this issue from mypy](https://github.com/python/mypy/issues/13117) Ellipsis is a [constant](https://docs.python.org/3/library/constants.html#Ellipsis) in Python, so we're able to do identity checks on it for narrowing. This allows supporting using Ellipsis...

enhancement request
addressed in next version

```python from typing import TypedDict class Foo(TypedDict): ... reveal_type(Foo.__required_keys__) reveal_type(Foo.__optional_keys__) ``` Mypy correctly reports: ``` foo.py:5: note: Revealed type is "builtins.frozenset[builtins.str]" foo.py:6: note: Revealed type is "builtins.frozenset[builtins.str]" ``` whereas pyright...

bug
addressed in next version

**Describe the bug** When `TypeAlias` is imported from anywhere other than `typing`, `Tuple` cannot be assigned to a `TypeAlias`. **To Reproduce** 1. Create a module that exports `TypeAlias` 2. Import...

… Currently its defaulted to false so that we insert newline between function parameters, but in tests we enable compact mode so that we don't need to re-write every test...

```python from collections.abc import Callable from typing import TypeVar T = TypeVar("T", bool, float) class MyClass: def map(self, func: Callable[[float], float] | Callable[[bytes], bytes]): ... def foo(x: T) -> T:...

bug

To preface, apologies if there's a simpler reproducible example here, mostly trying to replicate what's happening across modules in my codebase. In Pyright 1.1.362, something like this would have been...

bug

**Describe the bug** In pyright 1.1.358, the generated `__init__` types for attrs-wrapped classes no longer respect functions or constructors provided to the `converter` argument of `attrs.field`. The now-expected type seems...

bug
regression

**Describe the bug** We started to see a new type error in pyright `1.1.363` when type matching against enums using a `match` statement. Under some circumstances we see a false...

bug
regression

There seems to be a regression with `enum.nonmember` after upgrading to 1.1.363: ```python import enum class MyEnum(enum.StrEnum): VAL_1 = "val_1" VAL_2 = "val_2" _items = enum.nonmember({VAL_1: 1, VAL_2: 2}) def...

bug
regression