diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Enable flake8-comprehension checks for better / faster code

Open Skylion007 opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Enable flake8-comprehensions which is particularly trivial since the ruff linter was recently installed. It removes useless or inefficient Python comprehensions which should marginally improve performance and improve readability.

Describe the solution you'd like Enable ruff flake-comprehensions

Describe alternatives you've considered Keep them disabled by default.

Additional context I've recently enabled these checks fully in PyTorch, Sympy, and submitted a request to diffusers. After some bugfixes merged to ruff upstream, I haven't had any issues with the automatically reformatted code.

Skylion007 avatar Feb 19 '23 19:02 Skylion007