pyright
pyright copied to clipboard
Static Type Checker for Python
**Describe the bug** Pyright has an internal error in the provided code. **Code or Screenshots** ```python from typing import Any, Callable, ParamSpec, TypeAlias P = ParamSpec("P") Component: TypeAlias = Callable[P,...
### Problem In the example below, the second call to `apply_twice` causes a runtime error but it is accepted by pyright 1.1.375. In contrast, it is rejected by pyright 1.1.360...
…he need to track separate constraints for dest and src.
…he need to track separate constraints for dest and src.
Incorrect handling of class that is a subtype of multiple constraints in a value-constrained TypeVar
The following should type check without errors: ```python from typing import TypeVar, reveal_type class A: ... class B: ... class C(A, B): ... T = TypeVar("T", A, B) def test(a:...
… such as `str` and `bytes` that do not directly derive from `Sequence`, `MutableSequence`, etc. at runtime. DO NOT COMMIT! This is just an experiment.
**Describe the bug** Pyright considers a variable to be used if it has been used at least once, even if it is later reassigned to without use. **Code or Screenshots**...
Master
updated published code.
**Describe the bug** I'm trying to use `reveal_type` to check random callables. `reveal_type(some_object_with__call__)` returns the class name, and I need the `Callable[...]` signature. I can use `reveal_type(some_object.__call__)` on callable objects....
**Describe the bug** I gets false positive `Subscript for class "list" will generate runtime exception; enclose type annotation in quotes (reportIndexIssue)` error with pyright `v1.1.376`+ when `[tool.pyright]` is present in...