mirror of https://github.com/astral-sh/ruff
Summary -- Fixes #21121 by upgrading `RuntimeEvaluated` annotations like `dataclasses.KW_ONLY` to `RuntimeRequired`. We already had special handling for `TypingOnly` annotations in this context but not `RuntimeEvaluated`. Combining that with the `future-annotations` setting, which allowed ignoring the `RuntimeEvaluated` flag, led to the reported bug where we would try to move `KW_ONLY` into a `TYPE_CHECKING` block. Test Plan -- A new test based on the issue |
||
|---|---|---|
| .. | ||
| fixtures | ||
| package | ||
| project | ||
| __init__.py | ||
| disallowed_rule_names.txt | ||