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

**Describe the bug** If a dictionary annotated with literal keys is passed to a function with matching string arguments, if there are other defaulted arguments of a different type there...

bug
addressed in next version

When implementing metaclasses, it is relatively commonplace in methods such as `__new__` and `@classmethod`'s such as `__prepare__` to name the first positional argument `mcs`, `mcls` or `metacls`. This has a...

enhancement request
addressed in next version

Really minor issue: Code sample in [pyright playground](https://pyright-play.net/?reportMissingModuleSource=true&code=GYJw9gtgBALgngBwJYDsDmUkQWEMoCqKCAhgMYDWANFACqICmAJgCJJkwBQ3ZANiQGcBUAKLZ4ACnoJmbDjRhgYJXgF4AYioEMAlAC5OUI1FJDuTBsCjAArijISAVI4oB3EiDQC9hYuQoA2mII8AC6%2BiaCAtyctvYSOpxAA) ```python from typing import Unpack, TypedDict class Empty(TypedDict, total=False): pass def func(**kwargs: Unpack[Empty]): pass func() ``` Produces: ![image](https://github.com/user-attachments/assets/3bd9fcb4-e529-429a-8387-867081dc13fb) maybe `() -> None`...

bug
addressed in next version

**Describe the bug** Not sure how wide this bug is, but my `Sentinel` type used to negate types fine in experimental StrictTypeGuard back on 347. On 375 I'm assuming that...

bug

For the following code, pyright 1.1.373 correctly reports an incompatibility with the base class `A` when overriding the method `f` in the child class `B`: ```python class A: def f(self,...

bug
addressed in next version
regression

`dataclasses.is_dataclass` seems to always evaluate to false for generic types. Environment data - Language Server version: 2024.8.1 - OS and version: darwin arm64 - Python version (and distribution if applicable,...

bug

**Describe the bug** Pyright is having issues parsing the overloaded functions with generic type arguments shown below. Analyzing with `pyright test.py` using Pyright 1.1.373 works fine, however Pyright 1.1.375 hangs....

bug
addressed in next version
regression

This is a simplified version of what's seen in stdlib `urllib.parse`. Code sample in [pyright playground](https://pyright-play.net/?code=MQAgDgngTglg5gCwC4C4DOTYGMkCgYC2YA9lEiAGYCuAdjscQDZq4VTEEhIRgw1whCJMiACCNCAGVMAGhAA5AIYEApgBMAKlTCMVcxWjQqyAfW5g9IYgDdjjYorW5nWRgbQhJOmEgBKKtCpGJAAKJVVNbV0AShRcEATwd2dcV3dPbz8AoKQAIQgkALDldS0dFVj4xLBk5wABGzsHJzUVChAqKGZMkM7GFBAMKGiQAFoAPgzGH39A4IGAOiXcBtsu5txW9r60Hr6BgCMCgJGJqZns4PzCtEXluuo6JAZmBcYoKhMsRSwEFRDzOoALwaD4VTZtDpdXbTUL7MQSaTDMaTLyw2Y5EAAH3OWTmeWOtyqCRg7RgaD4GEUdH%2BfTkQ0qiSZICgKiQnRouIxwRC0WJIBUzBUcWZiVZ7KgnLRF3x1yKfOcAA8QECod1YSEAETEBCKGCavnuYxIMw8f6KuTSvE5aJAA) ```python # pyright:strict import functools from typing import AnyStr, NamedTuple, assert_type, overload class SplitResult(NamedTuple):...

bug
addressed in next version

## Environment data - VSCode version: 1.91.1 - Pylance version: 2024.8.1 - OS and version: Windows 11, Version 10.0.22631 - Python version: CPython 3.10.9, VSCode extension 2024.12.2 ## Code Snippet...

bug
addressed in next version

## Environment data - Pylance version: v2024.8.1 - OS and version: win11 - Python version (& distribution if applicable, e.g. Anaconda): 3.11.4 ## Code Snippet ```python a: list[int | None]...

bug