mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-27 18:36:35 +00:00
## Summary Disallow `Final` in function parameter- and return-type annotations. [Typing spec](https://typing.python.org/en/latest/spec/qualifiers.html#uppercase-final): > `Final` may only be used in assignments or variable annotations. Using it in any other position is an error. In particular, `Final` can’t be used in annotations for function arguments ## Test Plan Updated MD test |
||
|---|---|---|
| .. | ||
| corpus | ||
| mdtest | ||
| primer | ||
| README.md | ||
Markdown files within the mdtest/ subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs integration test.
See crates/ty_test/README.md for documentation of this test format.