ignore/fix ruff 0.16 new errors - #3358
Conversation
|
This PR is a bit too big so I kept some ignores for future fix. |
It looks like you did not ignore this? I see a bunch of those in there. |
|
I would advocate downgrading ruff (#3359) and then we can upgrade it back here while taking our time with the rules. In the mean time, we don't want people to get alarm fatigue and start ignoring actual errors because everything throws a million spurious complaints. |
I intended to fix this for ruff, by removing the unused noqa, and it works. However, flake8 disagrees with ruff on some places so that I have to 1) per-file ignore for flake8 or 2) add some noqa back. My current solution is to add some noqa back and ignore RUF100 for ruff. Most of noqa removals are kept since they are indeed useless. |
Ignore: EXE001, B008, UP031, PLR1711, UP034, RUF059, I001 Exclude: doc_legacy/ Fix: UP032, G010, FURB168, UP030 (532 auto-fixes)
…ignore D419, PLR0206, PLW1508, PLW0642, ISC004, TRY203 (now clean)
Ignored (unlikely to fix / too much to fix)
# noqadirectiveIgnored (need newer python)
Ignored (unnecessary)
__all__alphabeticallyIgnored (safe, kept for future fix)
not a == b→a != bIgnored (bug risk)
__config__.pyand misc.pyfrom __future__ import annotations__exit__missing exception parametersFixed (auto-fixed with --fix)
Fixed (real bug)