Clear `ruff` Configuration
Update
-
Cin the select list includes only complex-structure (C901), so it is not meaningful to selectCand ignore complex-structure (C901) at the same time, thus removing both. - When I remove import-shadowed-by-loop-var (F402) and undefined-local (F823) from the ignore list,
make style && make qualityshows nothing, also IMHO they can be useful, so they can be removed. - When I remove module-import-not-at-top-of-file (E402) and redefined-while-unused (F811) from the
__init__.pyfiles' ignore list, no error except one which I proposed to resolve at my previous PR; so removed them. -
src/diffusers/utils/dummy_*.pyfiles don't need to ignore unused-import (F401), so removed that line. -
[tool.ruff.format]section includes generic default values, so removed.
~Upgrade~
~1. IMHO, ambiguous-variable-name (E741) might be very useful in terms of readability, why ignoring?
2. Setting line-length = 119 and ignoring line-too-long (E501) applies on all codes but length of imports. I mean that ignoring line-too-long (E501) doesn't apply to the length of imports, so line-length = 119 holds for imports. When I remove line-length = 119, because I thought it was unnecessary due to ignoring line-too-long (E501); then unsorted-imports (I001) applies for "larger" imports because the default is 88. It seems that this is still being discussed. What to do here?
3. Why don't we benefit from all the power of ruff with its latest version? It was pinned to v0.1.5, and v0.4.2 has just been announced! IMHO, there are many more fun and beneficial rules.~
@sayakpaul @yiyixuxu @DN6
can you take a look here? @sayakpaul
Thanks for your proposal, but we don't want to make code styling ultra-sophisticated, to be honest. So, the simplest reasonable alternative works. Our efforts are better spent in improving the library design and then maintaining the things that come with it, TBH.
OK, understood :+1:. I am withdrawing the upgrade part. What about the update part, this PR?
I think this was a useless PR :smiling_face_with_tear:; thus, closing.
FYI: https://github.com/huggingface/transformers/pull/30932