pyrefly
pyrefly copied to clipboard
A fast type checker and IDE for Python
This would help in the situation where the IDE does not start the LSP with the Virtual Environment activated and where the virtual environment path is not fixed. See #1655...
### Describe the Bug Repro: 1. In the root of your project, run clone typeshed `git clone https://github.com/python/typeshed.git` 2. Make a pyrefly.toml with the following contents `typeshed-path="./typeshed"` 3. Make a...
### Describe the Bug Test code: ```python from typeguard import check_type from typing import reveal_type x: dict[str, int] | float = {} reveal_type(x) x = check_type(x, dict[str, int]) reveal_type(x) ```...
We should error when we detect that pyrefly is being run over code that uses django, but django-stubs isn't installed, or django-types is installed.
## Summary Fixes #1635. This PR fixes a type inference bug where generic functions (like `os.getenv`) returned incorrectly widened types when used on the right-hand side of an `or` expression....
### Describe the Bug Extension flags errors for using list[str] for `columns` and `index` on `pandas.DataFrame` , even though both accept array-like ` Argument `list[str]` is not assignable to parameter...
### Describe the Bug ### Sandbox Link _No response_ ### (Only applicable for extension issues) IDE Information _No response_
### Describe the Bug ```python from typing import Any, Callable, Protocol, reveal_type class Tensor: ... class Module: def _wrapped_call_impl(self, *args: Any, **kwargs: Any) -> Any: ... __call__: Callable[..., Any] =...
### Describe the Bug in this example: pyrefly knows that XB is incompatible there. pyrefly should rank it beneath the other suggestions which are compatible ### Sandbox Link _No response_...