Alex Waygood
Alex Waygood
## Summary This PR adds purely internal documentation to assist us, as red-knot developers. By having a common reference with precise definitions for certain terms, there's a reduced risk of...
**Describe the bug** Pyright sometimes (but not consistently, it appears) refers to objects returned by calls to `NewType` as being instances of `types.FunctionType`. E.g. for this code: ```py from typing...
### Summary In this snippet: ```py from typing import reveal_type, Iterable x: Iterable[list[int]] = [[42], [56]] reveal_type(x) ``` we currently reveal `list[Unknown | list[Unknown | int]]`. For comparison, mypy and...
It's easy for users to jump to these definitions in the stub file from inlay hints. It will be even easier to jump to these definitions if something like https://github.com/astral-sh/ty/issues/1575...
For example, in this situation, `raise` should not be included as a completion suggestion, because `for x in raise` is invalid syntax (Python's grammar dictates that only an expression can...
We have lots of rules that complain about invalid method overrides of one sort or another, and we'll be adding more in the future. The `invalid-method-override` rule is specifically about...
### Summary This (seen on https://github.com/astral-sh/ruff/pull/22019#issuecomment-3664706394) is horrible UX for a diagnostic message: ``` + pandera/engines/pandas_engine.py:1390:25: error[invalid-argument-type] Method `__getitem__` of type `Overload[(idx: int | signedinteger[_64Bit] | integer[Any] | signedinteger[_8Bit]) ->...
See https://github.com/astral-sh/ruff/actions/runs/20216754532. It failed again when I reran it. Because it _timed out_ rather than encountering an error during the job, the automation that should have created an issue about...
Both [pyright](https://pyright-play.net/?pyrightVersion=1.1.405&pythonVersion=3.13&reportUnreachable=true&code=GYJw9gtgBAhgRgYygSwgBzCALrOBnLEGBLCAUywAswATAKDoQBsY88oAxALjqj6gACzVnnJVavfgPgEiJMdXr8oNMsCgLaACmZ4AlFAC0APhQA7LFygA6WwxBkAbmRhMA%2BlgCeaMlo7XNGi09PTogA) and [pyrefly](https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEq2AxnRDcbpQC4PZxeVUTLjRhcAFrkwAddLKZRUcOHQBiiWXS10AAgqVxREqZu07G-QcKOSZ6bXUwwwdG1IAUCuAEo6AWgA%2BVnQuRDpCCNlZShgANxhUKAB9LlJiGHdVQjdMd29vWRAAGhAAVy5oOBJyRBAAYjoAVQqoCFS6MFL0YQhcdDgorGcOzhpULiT0UppsGEp3fDCIEN9AuksNe20YrlLKezBpEAA5adnKMOB8AF8jwpKyGLAoUkIuWigKBoAFUieX9YYHAEOhMPqQADme3GvXQhFkDQAyjAYHRxFwuMQ4IgAPQ4x7OF6ETgQnEwdA4zC4JhwHFg9CQ6EVPo4kaUBixVDQRiwUHgiBQwTM%2By4YjCqqyMjGdB%2BeKUOCwugAXjoRwAzIQAIwAJju6BA1xKQgq8VU0BgFDQWDwRDIBqAA) detect the unsoundness here, though [mypy](https://mypy-play.net/?mypy=latest&python=3.12&gist=cf7dbf1c58f50ff7fb4528abfceed39d) does not. We should also detect this as unsound and reject it: ```py from abc import abstractmethod class F: @classmethod...
Mypy and pyright both offer opt-in lints which, when enabled, cause them to complain about the `else` branch in this snippet: ```py def f(x: int | str): if isinstance(x, int):...