pyright
pyright copied to clipboard
Static Type Checker for Python
Just fixing casing for VS Code and IDE -> editor
In verbose mode, pyright should output the pythonVersion it is assuming. It currently logs: `Assuming Python version [object Object]`
For the following code, pyright correctly binds the type variables for the nested higher order functions call. The revealed type of `map2` is correct. ```python from collections.abc import Callable def...
**Preamble** The release notes for pyright v1.1.374 contains: > Fixed bug that results in a false positive when using a two-argument form of super() outside of a class. which appears...
Environment data - Language Server version: 2024.8.1 - OS and version: win32 x64 - Python version (and distribution if applicable, e.g. Anaconda): Python 3.8.10, in venv - python.analysis.indexing: true -...
Directed to new issue from microsoft/pylance-release#2128 ## Environment data - Pylance version: v2024.9.103 - OS and version: Windows 11 Pro 23H2 build 22631.4169 - Python version (& distribution if applicable,...
I'm not sure I can describe what's happening better than just sharing the code. MRE: ```python from enum import StrEnum class Foo(StrEnum): A = "A" for _ in range(2): baz:...
## Environment data - Language Server version: v2024.2.105 (pre-release) - OS and version: Ubuntu 20.04.6 LTS - Python version (& distribution if applicable, e.g. Anaconda): CPython 3.12.2 ## Code Snippet...
```python from __future__ import annotations from typing import Any import numpy as np import numpy.typing as npt def as_array(a: npt.ArrayLike) -> npt.NDArray[Any]: return np.array(a) def test() -> int: lst =...
**Describe the bug** ```python from numpy._typing._array_like import _ArrayLikeNumber_co def f(x: list[float]): _: _ArrayLikeNumber_co = x ``` This code fails to type check on 1.1.383 but passes on 1.1.382. The error...