diffusers
diffusers copied to clipboard
Enable flake8-comprehension checks for better / faster code
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.