Open Samuel-Therrien-Beslogic opened 5 hours ago
Thanks! Your analysis all seems correct to me. I'd happily accept PRs disapplying these rules to stub files.
For E741 we were quite cautious, and made the change preview-only for several minor releases before stabilising the change. I don't think we need to be as cautious this time around. Our versioning policy states that it's fine to apply changes in patch releases if they reduce scope (and these would be reductions in scope); we only need to wait for a minor release if a change increases the scope of a rule.
The linked PR is for all but the last two bullets since those were suggested with less oomph 😄
Ruff 0.8.0 ignores
ambiguous-variable-name (E741)
automatically in pyi files. This prompted me to look at other rules I disable specifically for.pyi
files and found the following which I think should apply in all cases:PLR0904
https://docs.astral.sh/ruff/rules/too-many-public-methods/PLR0913
https://docs.astral.sh/ruff/rules/too-many-arguments/PLR0917
https://docs.astral.sh/ruff/rules/too-many-positional-arguments/PLW3201
https://docs.astral.sh/ruff/rules/bad-dunder-method-name/SLOT
https://docs.astral.sh/ruff/rules/#flake8-slots-slotFBT
https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbtA
https://docs.astral.sh/ruff/rules/#flake8-builtins-aPLC2701
https://docs.astral.sh/ruff/rules/import-private-name/I haven't gone back and validated if these still trigger in stub files since I added them to our shared config, sorry if I tagged a rule that's already ignored.