ruff
1c7ea690 - [`flake8-type-checking`] Fix `TC003` false positive with `future-annotations` (#21125)

Commit
62 days ago
[`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
Author
Parents
Loading