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
When trying to load a specific rule's documentation page using a the lower case letter for that rule (e.g. https://docs.astral.sh/ruff/rules/f401), I get a 404 - Not Found.
After loading the page once using an uppercase letter instead (which does work), if I then try it again with the lowercase, my browser (Firefox) automatically corrects the lowercase to the uppercase and the site does load.
It might be nice to make the mirror work immediately in a case insensitive manner.
The text was updated successfully, but these errors were encountered:
dhruvmanila
changed the title
documentation mirror does not work with lower case letters
Rule documentation link does not work with lower case code
Dec 17, 2024
Yeah, I noticed this last week and I was wondering if this should be allowed because the rule selection wouldn't allow lowercase either (select = ["f401"] doesn't work). The same argument can be applied to rule names as well as it only works with lower case names so https://docs.astral.sh/ruff/rules/Unused-Import doesn't work.
What would be the argument not to allow it?
I guess formally you're right that it's an "invalid" rule code, but I don't think there's any level of confusion of what is intended when a user inputs a rule code with a lower case letter.
I find it convenient to type the rule code without worrying about the capitalization, and have now a few times been surprised as to why it doesnt always work (until I discovered that it'll only work if I've been on that page before).
When trying to load a specific rule's documentation page using a the lower case letter for that rule (e.g. https://docs.astral.sh/ruff/rules/f401), I get a
404 - Not Found
.After loading the page once using an uppercase letter instead (which does work), if I then try it again with the lowercase, my browser (Firefox) automatically corrects the lowercase to the uppercase and the site does load.
It might be nice to make the mirror work immediately in a case insensitive manner.
The text was updated successfully, but these errors were encountered: