mirror of
https://github.com/astral-sh/ruff.git
synced 2026-05-06 08:56:57 -04:00
b3fb864847
## Summary This PR adds the infrastructure to surface diagnostics during project and program settings resolution. The motivating use-case is: when we see an unsupported Python version in an editor, we want to surface a diagnostic rather than limiting to a `tracing` warning, as in: ``` warning[unsupported-python-version]: Ignoring unsupported inferred Python version `3.16`; ty will use Python 3.14 instead. --> venv/pyvenv.cfg:2:16 | 2 | version_info = 3.16.0 | ^^^^^^ 3 | home = base/bin | info: Expected one of `3.7`, `3.8`, `3.9`, `3.10`, `3.11`, `3.12`, `3.13`, `3.14`, `3.15`. info: Set `python-version` explicitly to override the inferred version. info: The version was inferred from your virtual environment metadata. ```