ruff/crates/ruff_linter/resources/test
Brent Westbrook 1c7ea690a8
[`flake8-type-checking`] Fix `TC003` false positive with `future-annotations` (#21125)
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
2025-10-30 14:14:29 -04:00
..
fixtures [`flake8-type-checking`] Fix `TC003` false positive with `future-annotations` (#21125) 2025-10-30 14:14:29 -04:00
package Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
project Rename `ruff_cli` crate to `ruff` (#9557) 2024-01-16 17:47:01 -05:00
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00
disallowed_rule_names.txt Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00