You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The message for rule https://docs.astral.sh/ruff/rules/future-rewritable-type-annotation/Missing from __future__ import annotations, but uses {name} is slightly confusing / misleading. It sounds like I need to use from __future__ import annotations when using typing.Union, when it actually means that adding from __future__ import annotationscan lead to simplified /modernized syntax. But that's also not checked unless relevant pyupgrades rules are turned on.
I think the message could be tweaked a bit to reflect that. I also assume FA and UP rules will likely be grouped together after the rules categorization #1774
The text was updated successfully, but these errors were encountered:
## Summary
Changes `future-rewritable-type-annotation` (`FA100`) message to be less
confusing. Uses phrasing from the rule documentation to be consistent.
For example,
```
from_typing_import.py:5:13: FA100 Add `from __future__ import annotations` to rewrite `typing.List` more succinctly
```
Closes#10573.
## Test Plan
`cargo nextest run`
The message for rule https://docs.astral.sh/ruff/rules/future-rewritable-type-annotation/
Missing from __future__ import annotations, but uses {name}
is slightly confusing / misleading. It sounds like I need to usefrom __future__ import annotations
when usingtyping.Union
, when it actually means that addingfrom __future__ import annotations
can lead to simplified /modernized syntax. But that's also not checked unless relevant pyupgrades rules are turned on.I think the message could be tweaked a bit to reflect that. I also assume FA and UP rules will likely be grouped together after the rules categorization #1774
The text was updated successfully, but these errors were encountered: