Open VeckoTheGecko opened 2 months ago
Thanks for opening this issue. I can see how this is confusing. I was actually just about to change the rule metadata but then noticed that, maybe I shouldn't.
The documentation's fix availability doesn't consider the fix's safety today, which makes sense because the fix is always available when using --unsafe-fixes
. But I can see how this isn't very clear, especially with the CLI message that explicitly states that the fix is unavailable.
@zanieb what's your take on fix availability and fix safety?
I see, so availability != safety (where I assumed it did). If safety was also mentioned in the doc that would have cleared it up (e.g., Fix is always available but not always safe)
Yeah, I think it might be useful to add some reference to fix safety in the rule header. It might also be useful to either provide a different icon or a different color to the fix icon in the rules table (https://docs.astral.sh/ruff/rules/#legend).
Docs mention "Fix is always available." but it is flagged as unsafe in the code
Code
with
isinstance(2, (int,float))
I getRelated to #2923