mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:51:25 +00:00
[ty] Tell the user why we inferred the Python version we inferred (#18082)
This commit is contained in:
parent
cb9e66927e
commit
d37592175f
20 changed files with 303 additions and 124 deletions
|
@ -27,8 +27,7 @@ error[unsupported-operator]: Operator `|` is unsupported between objects of type
|
|||
| ^^^^^^^^^
|
||||
|
|
||||
info: Note that `X | Y` PEP 604 union syntax is only available in Python 3.10 and later
|
||||
info: The inferred target version of your project is Python 3.9
|
||||
info: If using a pyproject.toml file, consider adjusting the `project.requires-python` or `tool.ty.environment.python-version` field
|
||||
info: Python 3.9 was assumed when resolving types because it was specified on the command line
|
||||
info: rule `unsupported-operator` is enabled by default
|
||||
|
||||
```
|
||||
|
|
|
@ -25,8 +25,7 @@ error[unresolved-reference]: Name `aiter` used when not defined
|
|||
| ^^^^^
|
||||
|
|
||||
info: `aiter` was added as a builtin in Python 3.10
|
||||
info: The inferred target version of your project is Python 3.9
|
||||
info: If using a pyproject.toml file, consider adjusting the `project.requires-python` or `tool.ty.environment.python-version` field
|
||||
info: Python 3.9 was assumed when resolving types because it was specified on the command line
|
||||
info: rule `unresolved-reference` is enabled by default
|
||||
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue